Posted on: 8/30/2012 8:31:11 AM | Views : 450

I have a website where i have webparts in my application, the website shows webparts in its homepage. The webparts are working fine in debug mode. however after hosting the webparts in IIS the webparts are not working at all. Throwing the BELOW ERROR: Cannot open database "MyDatabaseName" requested by the login. The login failed. Login failed for user 'MySystemIP_IMS-10\ASPNET'. I have changed the code in Web.Config to the below one. <connectionStrings> <add name="MyDb" connectionString="Data Source=MyServer;Initial Catalog=MyDatabaseName;Integrated Security=True" providerName="System.Data.SQLClient"/> </connectionStrings> <system.web> <webParts enableExport="true"> <personalization defaultProvider="MyWebPartsProvider"> <providers> <add name="MyWebPartsProvider" connectionStringName="MyDb" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"/> ...

Go to the complete details ...