I get parse error after uploading my Web Application to my server. I had an ASP.NET Web Site, but I migrated my files into a Web Application Project. Now, after I completed moving the files to the new project, everything works all right locally, but not at the remote server.
now afther i upload it to the server i get this error:
EDIT-------- this problem just keeping coming back even afther i tried put namespaces on of the .cs files and republish the site. even afther i publish the site all the CodeBhind files desapper so i add them myself via copy-past.
here how the solution explorer look and 1 of my aspx. files mybee you will see somthing worng i did:
here is my config file code:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
</system.web>
</configuration>
EDIT----------------------------------------- i can see the site now online, what i needed to do is give all the files the same namespace, and not use a out side folder (witch i used every time) i just drop all the files/folders in the webroot thank you all!.
I suspect you did not deploy the code-behind: main.aspx.cs
You probably have to set up
namespaces
for your entire project. Look at this walkthrough from Scott Gu's blog. It's for Visual Studio 2005, but it's pretty much the same.As per your web.config your target framework is 4.0 . Have you checked same your web site running in application pool in IIS is working on the same framework version?
If the framework is different on IIS than it might be cause of it. You can check it by Select the site on IIS, click ASP.NET tab, select ASP.NET version dropdown box.