hi,
i have a aspx page created in VS team system 2008, it works fine with the iis virtual directory (http://localhost/site/default.aspx) but when i copy the files on my host server it returns an application error. i think it's because my host supports asp 2. how
can i make my page with the version my host support?
and when i publish the site on a file system target (my machine) it also doesn't work. is it meant to work within VD/Server only? which files should i copy on the server?
default.aspx
web.config
bin directory
default.aspx.cs or precompiledapp.config?
on my machine using VD it works fine and also when i choose view in browser within visual studio . i copied the files on server and it's not even working on my machine using the internet with following error :
server error in '/' application
runtime error
Description:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local
server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors>
tag should then have its "mode" attribute set to "Off".
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
ASP.NET web applications will not show errors when accessing the site
from remote machines, you will only see the generic error message you are gettting. Application specific error messages can be viewed when the site is accessed locally.
To view messages generated on a remote server from a local client, add the following code to your web.config file
Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: 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.
Source Error:
Line 29: ASP.NET to identify an incoming user. Line 30: --> Line 31: <authentication mode="Windows" /> Line 32: <!-- Line 33: The <customErrors> section enables configuration
Your application may be running in a folder below another application. You need to create it as an application in IIS to make it like a virtual directory. This lets you change certain settings like the authentication mode.
Goto IIS Administration, Right click on the folder, choose Properties, and hit the Create button.
--
Gokul Raghuraman
Marked as answer by comboy on May 27, 2008 06:43 PM
should i create the virtual directory with the same path as it's on the server? so i can't just copy the files from my machine to a directory created on the host server?
shall i make a virtual directory on the server or it's enough to make the virtual directory on my pc and upload it to the same path on the server
1. Do you want the Authentication mode to be done via windows or forms?
2. Is the folder you are publishing to (on the server) set up as a virtual directory and as an application within IIS?
3. If you add a standard HTML file to this folder (e.g. test.htm with 'testing' as the content), can you view this HTML file via the web browser if you navigate to it?
Please remember to Mark As Answer if helpful
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
the folder is configured as a virtual directory on my machine, but when i upload it on the server it's just in a normal directory with a different path. and my site contains other previous html pages work fine in various folders
You will need to set the folder up as a virtual directory on the server and in the properties panel of the route within IIS, make sure that the application name has been set in the Applications Settings section under the Virtual Directory Tab.
Also, make sure that the ASP.NET tab is set to the correct framework version.
Please remember to Mark As Answer if helpful
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
Marked as answer by comboy on May 27, 2008 06:42 PM
comboy
Member
2 Points
12 Posts
Publish aspx page
May 25, 2008 10:21 AM|LINK
hi,
i have a aspx page created in VS team system 2008, it works fine with the iis virtual directory (http://localhost/site/default.aspx) but when i copy the files on my host server it returns an application error. i think it's because my host supports asp 2. how can i make my page with the version my host support?
and when i publish the site on a file system target (my machine) it also doesn't work. is it meant to work within VD/Server only? which files should i copy on the server?
default.aspx
web.config
bin directory
default.aspx.cs or precompiledapp.config?
gokul raghur...
Member
400 Points
70 Posts
Re: Publish aspx page
May 25, 2008 04:28 PM|LINK
Could you post the error message that you are seeing on your local machine and host machine ?
Gokul Raghuraman
comboy
Member
2 Points
12 Posts
Re: Publish aspx page
May 25, 2008 06:56 PM|LINK
on my machine using VD it works fine and also when i choose view in browser within visual studio . i copied the files on server and it's not even working on my machine using the internet with following error :
server error in '/' application
runtime error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
PS:my host is using windows server 2003
gokul raghur...
Member
400 Points
70 Posts
Re: Publish aspx page
May 26, 2008 01:22 PM|LINK
ASP.NET web applications will not show errors when accessing the site from remote machines, you will only see the generic error message you are gettting. Application specific error messages can be viewed when the site is accessed locally.
To view messages generated on a remote server from a local client, add the following code to your web.config file
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
You should then be able to see if there is any other error.
Gokul Raghuraman
comboy
Member
2 Points
12 Posts
Re: Publish aspx page
May 26, 2008 02:10 PM|LINK
now it comes with this error
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message: 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.
Source Error:
Source File: C:\Inetpub\vhosts\orienthotel.ir\httpdocs\emu\web.config Line: 31
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
gokul raghur...
Member
400 Points
70 Posts
Re: Publish aspx page
May 26, 2008 06:50 PM|LINK
Your application may be running in a folder below another application. You need to create it as an application in IIS to make it like a virtual directory. This lets you change certain settings like the authentication mode.
Goto IIS Administration, Right click on the folder, choose Properties, and hit the Create button.
Gokul Raghuraman
comboy
Member
2 Points
12 Posts
Re: Publish aspx page
May 27, 2008 03:34 PM|LINK
should i create the virtual directory with the same path as it's on the server? so i can't just copy the files from my machine to a directory created on the host server?
shall i make a virtual directory on the server or it's enough to make the virtual directory on my pc and upload it to the same path on the server
thanks for your help
christiandev
Star
8597 Points
1841 Posts
Re: Publish aspx page
May 27, 2008 03:59 PM|LINK
Hi,
1. Do you want the Authentication mode to be done via windows or forms?
2. Is the folder you are publishing to (on the server) set up as a virtual directory and as an application within IIS?
3. If you add a standard HTML file to this folder (e.g. test.htm with 'testing' as the content), can you view this HTML file via the web browser if you navigate to it?
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
comboy
Member
2 Points
12 Posts
Re: Publish aspx page
May 27, 2008 04:23 PM|LINK
the folder is configured as a virtual directory on my machine, but when i upload it on the server it's just in a normal directory with a different path. and my site contains other previous html pages work fine in various folders
christiandev
Star
8597 Points
1841 Posts
Re: Publish aspx page
May 27, 2008 04:35 PM|LINK
You will need to set the folder up as a virtual directory on the server and in the properties panel of the route within IIS, make sure that the application name has been set in the Applications Settings section under the Virtual Directory Tab.
Also, make sure that the ASP.NET tab is set to the correct framework version.
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)