First of all, if you have uploaded your database to your shared host provider, you always need to make sure you obtain the correct connection string details from your host.
If you are on a shared host, you need to remove the "Integrated Security=True" section on your web.config. You also need to make sure you change the web.config connection string with the details given by your host and you must include the database name, database
username and password on the connection string.
Please mark this response as an "answer" if it helps you. Thanks heaps!
On production server, most case it will be full version sql server. You need to attach the mdf file to their sql server and use it as full version database. About connection strings you can check out http://www.connectionstrings.com for good samples.
connersz
Member
153 Points
175 Posts
Problems changing asp.net member database to online version.
Jan 27, 2013 02:27 PM|LINK
I have been using the ASPNET membership database, i have just uploaded it to my hosting and changed the connection strings in the web.config.
The problem is that now i receive an error and i cant figure out what's wrong. Below is my code.
The error says: [Win32Exception (0x80004005): The network path was not found]
In my local version i attached the ASPNETDB in server explorer but it didnt seem to add anything into the web.config.
This is the connection string from my hosting which i added to the web.config:
<?xml version="1.0"?> <configuration> <appSettings> <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> </appSettings> <connectionStrings> <add name="BreakspeareConnectionString" connectionString="Data Source=CONNERS-VAIO\SQLEXPRESS;Initial Catalog=Breakspeare;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="ConnectionStringMember" connectionString="Server=ATLAS-SQL-07; Database=db; User=user; Password=pass"/> </connectionStrings> <system.web> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ConnectionStringMember" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/"/> </providers> </membership> <roleManager enabled="true"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ConnectionStringMember" applicationName="/"/> </providers> </roleManager> <machineKey validationKey="2E4143364B296BA9EE3CBCA96862309D27EDCFD2BC9C7432235FFAD6F1C704EC6CF7264436CF40D476BEC7D914AC67AEE8805B6262811C85925805EDFF0877CA" decryptionKey="123DB0C9A12B9C1743652B70C918D10AD2F3859DA478B57DA9E5AF273344D2D8" validation="SHA1" decryption="AES" /> <authentication mode="Forms"> <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH"/> </authentication> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> </system.web> </configuration>necro_mancer
Star
8169 Points
1595 Posts
Re: Problems changing asp.net member database to online version.
Jan 27, 2013 11:32 PM|LINK
hi there,
First of all, if you have uploaded your database to your shared host provider, you always need to make sure you obtain the correct connection string details from your host.
If you are on a shared host, you need to remove the "Integrated Security=True" section on your web.config. You also need to make sure you change the web.config connection string with the details given by your host and you must include the database name, database username and password on the connection string.
Please mark this response as an "answer" if it helps you. Thanks heaps!
Professional SQL 2008 R2 Service
Topspy
Contributor
3913 Points
836 Posts
Re: Problems changing asp.net member database to online version.
Jan 28, 2013 07:55 AM|LINK
On production server, most case it will be full version sql server. You need to attach the mdf file to their sql server and use it as full version database. About connection strings you can check out http://www.connectionstrings.com for good samples.
Asp.net Hosting | Windows Hosting | SQL Server Hosting