I developed one asp.net application then copy this application and put on another machine and execute this application
the following web config error was thrown, I already changed the Datasource name,userID,password in the webconfig
could anybody guide to me how to solve this problem.
It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
ASP.NET to identify an incoming user.
Line 83: -->
Line 84: <sessionState mode="InProc" cookieless="false" timeout="600"/>
Line 85: <authentication mode="Forms">
Line 86: <forms loginUrl="Login.aspx" protection="All" timeout="600" path="/"/>
This is the common as well as the generic error whenever you are copying the application from some other location and try to execute or try to build in your system.
The main reason for this error is that whenever you copy that application, it has the solution already build in some folder. Now that folder has changed due to location changed. Due to that its root is different now and at the same time, its web.config which should be at root level is not as per the solution build.
To resolve it, you can try out one of the below listed options:
Open the solution directly by double click. If it’s not able to load your project and show the message “the solution is either removed or at different location”, then go to the solution explorer and right click –> Load the solution. It will prompt a message by saying that the solution is not available at the path “….path name…”
Now you can place your project at this path with same directory and then try it by right click on the solution explorer project –> Load
It should be load.
If you have already copied your project and kept it in a folder. Check the folder which consists of web.config file. Take that folder out and then open the solution. In this case, your application should be able to get the web.config file at the root level and it should be loaded.
Hope it will give you the idea to resolve your issue.
Let us know if still you are not able to open your project.