Publishing An ASP.NET Website With Visual Studio .NET 2005

  • Thread starter Nathan Sokalski
  • Start date
N

Nathan Sokalski

I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET
2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a
*.dll with the name of the Project to a /bin/ folder in the same directory
as the source code. However, in Visual Studio .NET 2005 when I selected
'Publish Web Site' and selected a target location to place it in, it placed
the following files in it:


All *.aspx files
All *.html files
All *.css files
All *.js files
All *.mdb files
web.config
PrecompiledApp.config
images/*.*
bin/App_Code.compiled
bin/App_Code.dll
bin/App_Web_p5v6buoq.dll
bin/App_Web_xx-bm_x8.dll


This is fine, except I don't know what to do with the following of these
files:


PrecompiledApp.config
bin/App_Code.compiled
bin/App_Code.dll
bin/App_Web_p5v6buoq.dll
bin/App_Web_xx-bm_x8.dll


What are each of these files, what do I do with each of them, and why are
there 3 *.dll files now, unlike just one like there was in Visual Studio
..NET 2003? Thanks.
 
G

Guest

Nathan,
The default model in ASP.NET 2.0 is different. Too long to explain. Easy
fix: If you want it the old way, you can have it. Download the Web
Application Project Add-in and it will work just like in ASP.NET 1.1. -- even
better, in fact. Just search on the phrase to find the download.
Peter
 
C

Cor Ligthert [MVP]

Nathan,

I would have written the same as Peter, but I have the link in my favorites.
(It creates a completely different website than the standard 2005 one while
it uses again the name codebehind after first creating a website with the
first website version from 2005 we have all done it new with this one
because it is easier to handle as project)

http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx

I hope this helps,

Cor
 
G

Guest

Our ISP claims support for .Net 2.0 (and we've turned on the support in their
online configuration page) and said that we shouldn't need to download or add
something new. Yet we are also having trouble when we copy all the files
from "Compiled Site" we are using in Visual Studio 2005 to their server.
Again the application runs great while testing in VS.

This is a new site, not a converted/upgraded site from 2003. I can't get
anyone at our ISP to tell me the structure they are looking for, all they
claim is that they support .Net 2.0 and that they have customers using it.
Are there standard files that should be copied over? Is the
PrecompiledApp.config file necessary?

After using 2003, I expected the upload to server process to take me 5
minutes to complete. I've now spent over a day and a half messing around
with this. I must be missing something obvious - the site we built is very
simple.
 
G

Gerry Hickman

Hi,

1. What publishing method and protocol do they provide for you?

2. How do you configure new applications on their server? Do they set up
a single default app, or are you able to run 23 different apps if you
wanted to?

3. How do set the authentication methods on their server for different
folders, *or* did they set it up for you?

Delete everything you put in the site, then create this single file and
call it "Hello2.aspx", then upload it to your site, then browse to it
and tell me what you see on the screen.

<%@ Page Language="C#" %>
<html>
<head></head>
<body>
<%Response.Write("Hello C# World");%>
</body>
</html>
 
G

Guest

Gerry,

Thanks for the response. I tried what you asked and received the same
message. Although it works fine in Visual Studio (Start Debugging - F5), I
can't seem to get it to run elsewhere. I use CuteFTP to copy the files from
the "C:\CompiledSite" directory to the location on the server. We have
numerous Visual Studio 2003 (.Net 1.1) applications running on the server -
one per directory (we set Default.aspx as the start page and associate the
application with a subdomain/domain: TestOne.DomainName.com).

Instead of calling it Hello2.aspx I put the code in Default.aspx and then
built the application, tested it, used "Publish Web Site", and then ftp'd the
CompiledSite files (and bin directory) to the server.

The error message we get says just that there is a RunTime Error and then
shows a suggestion for changing our CustomErrors in the Web.config file.

We also attempted to test the "CompiledSite" based on a suggestion from the
Visual Studio help/manual. We set the CompiledSite directory properties for
Websharing and started Internet Explorer and pointed to the Default.aspx
file. We received the following error from that:

********

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

A name was started with an invalid character. Error processing resource
'http://localhost/CompiledSite/Default.aspx'. Line...

<%@ Page Language="C#" %>
-^

********

Not sure if that helps or not. I think our next attempt is to download the
code the others have talked about and see if it changes the layout to
something our ISP site understands.
 
G

Gerry Hickman

Hi,
can't seem to get it to run elsewhere. I use CuteFTP to copy the files from
the "C:\CompiledSite" directory to the location on the server. We have
numerous Visual Studio 2003 (.Net 1.1) applications running on the server -
one per directory (we set Default.aspx as the start page and associate the
application with a subdomain/domain: TestOne.DomainName.com).

OK, in that case, how do you configure each site for .NET 1.1 vs .NET 2.0?
Instead of calling it Hello2.aspx I put the code in Default.aspx and then
built the application, tested it, used "Publish Web Site", and then ftp'd the
CompiledSite files (and bin directory) to the server.

OK, that's not what I asked you to do (!), but see below.
The error message we get says just that there is a RunTime Error and then
shows a suggestion for changing our CustomErrors in the Web.config file.

OK, you need to work out which is the "master" directory, and then
adjust the web.config file so that you can view errors remotely. In
theory you'll have one web.config for each site, but if you don't supply
one, it will probably use the one from the parent path.

It could be a real mess if you're running .NET 1.1 and .NET 2.0 side by
side unless they have a really robust admin interface for keeping them
separate and with the right config files in the right places.

Can you do this:

1. Sort out which site is running which .NET version

2. Sort out web.config in either the master or TestOne site so that you
can view errors remotely

3. Upload my hello2.aspx file to a totally clean test location. Do not
try to build it from within Visual Studio!! Just copy that one file.
Don't call it default.aspx either, that could cause confusion.

4. Browse to hello2.aspx, what does it say now?
 
G

Guest

Gerry,

First - Thank you for all the help.

Here's some answers to your questions:
- The ISP has a page to configure the subdomain to accept .Net 2.0. I've
made the selection.
- I tried again and copied your code using Notepad and saved and uploaded as
Hello2.aspx. I didn't think this would work since the ISP also has a
configuration page that allows you to select from a number of different
standard start pages (Default.aspx, Default.htm, ...). The site now gives
the following error:

*************
You are not authorized to view this page
You might not have permission to view this directory or page using the
credentials you supplied.

--------------------------------------------------------------------------------

If you believe you should be able to view this directory or page, please try
to contact the Web site by using any e-mail address or phone number that may
be listed on the ___Domain___ page.

You can click Search to look for information on the Internet.

HTTP Error 403 - Forbidden
Internet Explorer
*************

I'll now work on the config file Customerrors - something I should have
experimented with a while ago. I'll let you know what I learn.
 
G

Gerry Hickman

Hi jmcs,
Here's some answers to your questions:
- The ISP has a page to configure the subdomain to accept .Net 2.0. I've
made the selection.

OK, it makes sense now.
- I tried again and copied your code using Notepad and saved and uploaded as
Hello2.aspx. I didn't think this would work since the ISP also has a
configuration page that allows you to select from a number of different
standard start pages (Default.aspx, Default.htm, ...). The site now gives
the following error:

*************
You are not authorized to view this page
HTTP Error 403 - Forbidden
Internet Explorer
*************

OK, this is a completely different type of problem; it appears to be
saying you are not even allowed to browse to a page in your own site!
Have you checked the authentication methods for this sub-site?

Can you try uploading a static HTML page

<html><head></head><body>Hello World</body></html>

Do you still get 403?

It seems your v1.1 sites are allowing you to browse, but not your v2.0
sites? Perhaps try uploading hello2.aspx to one of your v1.1 sites and
then browse to it direct - does it work?
 
A

angurth

Hi,

I think you have to define a new Connection Pool at the IIS Server. Y
you dont do that, you can not have 1.1 and 2.0 .NET aplications working
at the same time.

regards,




jmcs ha escrito:
 
Joined
Dec 20, 2007
Messages
1
Reaction score
0
Vic

I'm not sure where your at with this or if this will help....
You MUST setup application pools in IIS for FW 1.1. and 2.0 projects to run seperately. They are not compatible in the same space. This created unpredictable results for us. I finally found the info somewhere on the microsoft site.
Create the virtual, change the pool in the Virt Dir tab, set version in asp.net tab.
I was looking for the reverse answer to your question.
We had a bunch of 2003 projects converted to 2005 which create the cryptic DLL name during the publish process. All new 2005 projects (with the create XML doc file option, I think) creates the DLL with the real project name. I can't figure out how to force the correct name on the converted projects. If anyone knows, please send me the info or an alert ate (e-mail address removed)

Thanks Vic
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top