views:

706

answers:

5

Ok heres the deal I purchased a windows shared hosting account on godaddy that came with 2 MSSQL databases. I setup one to hold my site data and the other installed aspnet membership schema to store site members. The site works perfectly even displaying data from the 1st database. However when I try to login or register I get this nasty error

Exception Details: System.Configuration.Provider.ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.

Ive gone through my web.config and theres nothing wrong with my 2 connection strings. It seems godaddy has a problem with using 2 mssql databases simultaneously when 1 is for membership.

Googling just finds a whole lot of people with the same problem -- but no solutions! Does anyone know a solution or a workaround?...or has anyone ever successfully used 2 databases(1 for membership) on godaddy?

+1  A: 

I hope my experience benefits every one. Basically if you want to avoid aspnet membership problems on godaddy always use "LocalSqlServer" as the connectionstring. i.e

<providers>
    <remove name="AspNetSqlMembershipProvider" />
    <add name="AspNetSqlMembershipProvider" connectionStringName="LocalSqlServer"
        ..other attributes here... />
</providers>

Then create the "LocalSqlServer" connectionString...remember to remove it first

<connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer"
        connectionString="Data Source=xxxx; Initial Catalog=xxx; User ID=xxx; Password=xxx;"
        providerName="System.Data.SqlClient" />
</connectionStrings>
The_AlienCoder
Hi, a million thanks to you for this solution. I was going to sleep after scratching my head, then googled and then got your reply.
pokrate
A: 

I am getting following error although i did excetly same thing. "Login failed for user 'PHX3\Iusr_4644595'."

I'm not sure from where it is taking this userid and password.

although i am able to fetch data from other test table. but it is giving this error while using membership controls.

Girish Meena
It seems your host is ahving problems authenticating your application. Make sure you enter the correct username + password for your database in the connection string.
The_AlienCoder
A: 

I'm not sure from where it is taking this userid and password.

although i am able to fetch data from other test table. but it is giving this error while using membership controls.

Girish Meena
A: 

Hi, I try the above, but the membership is still having issues when i try to list membership info...it's complaining null object but i do have a user in the table(s).

What i did: 1. from my local pc, i generated the script (within vwd 2008) for 2005 2.run the sp from godaddy and it generated the tables w/o errors at the sametime dropping all the preinstall membership tables when you install the db in goddady. 3. i am able to write to the misc tables, but get membership info via: string m1 = "jsmith"; MembershipUser mu = Membership.GetUser(m1); 3. Guid id = (Guid)mu.ProviderUserKey; Response.Write(id); GOT error on the #3 System.NullReferenceException: Object reference not set to an instance of an object.

Any help would be much appreciated it!

Godaddywoes
A: 

God !! thanks a lot , I've been searching why my membership system does not work, thank a lot for sharing the solution.. I would have never thought to use only LocalSqlServer on godaddy ... now its working because of you...

JSebastien