Click here to Skip to main content
15,896,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I have a domain and i did manage the site pages in that domain. For example, my hosting domain virtual folder is "public_html". I have managed the site pages in this folder. Also I have created a folder called "test" and set virtual path under the "public_html" folder. "test" is used to fix the bugs and before release the "public_html" folder. Initially we did not used to update data in database. just manage contents only for. Right now i have used to update data in database. So i am using some class library to insert/update the data to database. once i did publish and release these changes to "public_html" folder. Now it is working fine. And then I moved these also to "test" folder.

In "test" folder, i got following unhandled error when run the pages in "test" virtual directory.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
AMS.Web.Data.DataManager..cctor() +50

[TypeInitializationException: The type initializer for 'AMS.Web.Data.DataManager' threw an exception.]
AMS.Web.Data.DataManager.CloseConnection(MySqlConnection connection) +0
AMS.Web.Core.UserService.GetUserData(String userName, String password) +1863
Login.btnSubmit_Click(Object sender, EventArgs e) +92
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Please help me to resolve this issue.
Posted

1 solution

Hi Friends,

I solved this issue. I given different connection string name for both web config file, then it is working fine.

I am not sure it is valid solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900