Deploy an ASP Application

W

Wayne Wengert

I built an ASP application and it runs fine on my local IIS. I am trying to
move the application to my web service (ISP) out on the internet. I've read
several of the help articles but they all seem to think I am deploying to
localhosts.

I created a new directory on my web page and copied most of the files from
the wwwroot subdirectory where my project exists. When I try to open the
page (by pointing to "WebForm1.aspx in the new directory) I get the error
shown below. Initially, the authentication mode was "Windows" but that gave
the same error. I changed it to "None" thinking that would resolve it.

What do I have to do in Web.config to get this to work? Also, exacctly which
files really need to be uploaded?

TIA

Wayne


==================================================================

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:

Line 37: by Microsoft that offers a single logon and core profile
services for member sites.
Line 38: -->
Line 39: <authentication mode="None" />
Line 40:
Line 41:

Source File:
C:\inetpub2\resadmin\wengert\wengert.org\www\ASPDataGridProj\web.config
Line: 39
 
D

DalePres

If you use FrontPage to deply your application (and you can do so from
Visual Studio.Net), FrontPage extensions will set the directory as an IIS
application. Otherwise, the directory must be set as an IIS application
using the IIS Admin utility on the server or from a machine where you can
connect to the server with administrative privileges.

Dale
 
W

Wayne Wengert

Dale;

Thanks for the response. Since I only have an account on an ISP's server I
guess connecting to the server with admin rights is not possible.

Exactly how do I go about deploying using Frontpage? I've never used
Frontpage. I am using VSNET 2003 from a WinXP Pro system and I do have
Frontpage installed as part of Office 2003.

Wayne
 
D

DalePres

You don't have to have FrontPage installed on your machine. The necessary
functionality for publishing to a FrontPage enabled server is built into
Visual Studio .Net. Open your web project, go to the Project menu and then
choose Copy Project. In the Copy Project dialog, make sure you select
FrontPage as the web access method.

You'll probably use whatever your username and password is for your hosting
service but you may need to contact them for the appropriate username and
password.

This is the same method I use for publishing to my own hosting service.

Dale
 
R

Rick Spiewak

If you don't have admin rights, you'll need to ask your ISP to set the
folder as an IIS application.
 
W

Wayne Wengert

Thanks Dale. I'll give that a try.

Wayne


DalePres said:
You don't have to have FrontPage installed on your machine. The necessary
functionality for publishing to a FrontPage enabled server is built into
Visual Studio .Net. Open your web project, go to the Project menu and then
choose Copy Project. In the Copy Project dialog, make sure you select
FrontPage as the web access method.

You'll probably use whatever your username and password is for your hosting
service but you may need to contact them for the appropriate username and
password.

This is the same method I use for publishing to my own hosting service.

Dale
 
W

Wayne Wengert

Interesting. I tried that again on my main ISP account and got the same
error. I then tried copying the whole directory to another ISP account and
now I am getting the following error - even though I edited the Web.Config
file as directed?


============================================================

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".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


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.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>


==============================================================

Wayne
 
D

DalePres

Are you sure that's the same error? What you're quoting is the default
error message if you have customErrors off, but what you quoted would apply
to any server error with custom errors off.

If you're not seeing the message you discussed in your original post about
the application not being configured as an IIS application then you may just
have an error in your code now.

The custom errors attribute in web.config is used to control how much detail
you get from the server. I'm not sure if you understand how that works or
not. If you do, then disregard this but let me summarize it:

If you set customErrors to off, you will see the details about the error
displayed in the browser when you encounter a server error.
If you set customErrors to remote only, then the message you quoted last
will be displayed in all browsers EXCEPT for browsers running on the local
machine (the machine running IIS). The local machine will display more
specific details.
If you set customErrors to on then you will get the filtered error
description you quoted here both on the local IIS machine or any other
machine.

When you're troubleshooting a hosted site, you should set customErrors to
on, so that you can see the details of the error. When it's pretty stable,
then set customErrors to off. Since you can't work directly on the machine
anyway, there's no reason to set it to RemoteOnly.

Hope this helps,

Dale
 
R

Rob Van Zant

Dale,

I am having a similar problem to Wayne and would like to try this method of
publishing. I don't see anywhere to enter my username and password. Is
there a certain format for the Destination project folder that I can include
my login info?

For anyone that's interested in my specific problem, I'll include the log
below. I'm not sure if it's a security problem or that my dll cannot be
found.

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: KLLib
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/0e8190ed/8d0d2be5/KLLib.DLL.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/0e8190ed/8d0d2be5/KLLib/KLLib.DLL.
LOG: Attempting download of new URL
file:///C:/Sites/accounts/kebam/klfilterwizard.com/www/Testing/bin/KLLib.DLL.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: KLLib, Version=1.0.1581.25046, Culture=neutral,
PublicKeyToken=null

Thanks,
Rob
 
D

DalePres

If you try it and a password is required, it will pop up the password
window. At least, that's how it worked for me. I'm not an expert; I only
know that I was having the same problem and my hosting service pointed out
the solution to me.

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top