Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd error after adding profile to web.config

Status
Not open for further replies.

FarleySoftware

Programmer
Jan 14, 2008
18
US
I added a profile section to web.config, to hold a shopping cart item (as in Wrox Beginning ASP.NET 2.0). It's under <system.web>:

Code:
    <anonymousIdentification enabled="true"/>
    <profile enabled="true">
      <properties>
        <add name="Cart" serializeAs="Binary" type="CabaretStore.Commerce.ShoppingCart" allowAnonymous="true"  />
      </properties>
    </profile>

It works great locally!

But on the hosted server, I get this error when attempting to load shoppingcart.aspx:

Code:
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Any attempt to add an item to the cart from other pages results in the same error message.

The odd part to me, is that there's nothing DB-related on shoppingcart.aspx ... not in that page, not in the cart control, not in the class module Shopping.vb. All the DB calls are handled on other pages, and those all work just fine.

Should I be working with the <profileService> section (currently commented out) instead perhaps?

Thanks in advance.

Farley Software Solutions
 
Hi there!

I once had a lot of problems with one site when I added the profile section to the web.config. The errors were not yours but drove me mad nevertheless.

I googled everything and all I could find was that it was something to do with the hosted server's temporary asp.net files.

What I did was remove the profile section from the web.config >> restart the app. and then add the profile back again.

Hope this can help you.

Cheers,
Jon

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top