Combining of two projects

Topics: ASP.NET 2.0
Aug 28, 2011 at 4:43 PM

I already have a project which I have combined with the current project( to make it one project.I am using sql server database for my project whereas for current project 'XML".My project is now complete & want to upload in web server, except one problem. I am facing problem in following config. setting in  web.config when testing ln local server:

  <add name="UIIOAConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\UIIOA.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
  <add name="HealthConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Health.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

<membership defaultProvider="XmlMembershipProvider">
        <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed"/>
        <!--<add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>-->
        <!--<add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine"/>-->
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="UIIOAConnectionString"
            enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
            maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="20"
            applicationName="/" />

Here I can not login in sql server database schema. When I remove default attribute in XmlMembershipprovider then I can not login as administrator.I can login as editor only.I have spent lot of time but could no do it.Kindly help in solving this problem. Please write all the steps.


Aug 30, 2011 at 11:40 AM

When you remove the XmlMembershipProvider attribute, are you replacing it with another "defaultProvider"?

Does the "editor" account exist in your SQL DB?  The 2 uncommented providers in your <membershipSection> are XmlMembershipProvider and AspNetSqlMembershipProvider.  I'm assuming that the 2nd one (SQL) is kicking in when you remove XmlMembershipProvider.  You might want to check and see what users are defined in your SQL DB.  It may be that an editor is defined, but an admin is not defined.

BE has an "Administrators" role.  So the most important thing is that one of the users in your SQL DB is tied to the "Administrators" role.  If you have that setup, then you should be able to log in under that user.

You might want to add the Administrators role to the "editor" since you are able to log in under the editor.  After making the editor an administrator, you could then go in there and create a real administrator account.

If you make any changes directly to the SQL DB, you may need to restart the application in order for BE to see the latest data (since it often caches data in memory).  You can restart the application by making any change to the web.config file (add a space, etc).

Aug 30, 2011 at 5:38 PM

Thanks for your reply. Problem is still there. I again explain here that I have a website domain have created a login facility for the user & SQL DB is data store without role functions.I have only used & modified default schema ASP NET regsql.exe tool. I have not created any ADMN role but certain pages have been restricted for the users. Now with BE I want to create a Blog functionality in my website with another login where default attributes of BE has been used.My project is now complete but one problem exists.When I use default attribute I am not able to login SQL & when I comment default attribute I can not login as administrator with admin as user & password but as a editor user I can login when testing in local server.Further I have not created any Editor in SQL DB & even no roile was defined.Only used default schema.I have created a logged in template in default.aspx page so that only logged in user can visit & go to their respective page from default page.So please advise me what to do if every thing is clear here.Pl write in steps. I want to put BE on index.aspx page as hyperlink so that when user clicks the hyperlink, he can register himself & can post a Blog.Please help.


Sanjeev Sood