Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 25 votes, 4.36 average. Display Modes
  #1  
Old 12-22-2003, 08:59 AM
Henk v.d. Vaart Henk v.d. Vaart is online now
Registered User
 
Join Date: 10-27-2003
Posts: 7
Question Problem building ASP.NET application via its project-file.

Hi,

I am using Visual Build Professional (5.1) and have some problems building a VS.NET (ASP.NET) web application via its related project file (so I am NOT using a solution file).
Building a standard (non web) application via its related project file is going OK.

When running from the command line (Visual Studio .NET 2003 Command Prompt) I verified that I should call 'devenv' with the URL (see below):
devenv "C:\Inetpub\wwwroot\MyWebApp\MyWebApp.csproj" /build Release /project "C:\Inetpub\wwwroot\MyWebApp\MyWebApp.csproj"
Build FAILED --> "Invalid project"
devenv "http://localhost/MyWebApp/MyWebApp.csproj" /build Release /project "http://localhost/MyWebApp/MyWebApp.csproj"
Build SUCCEEDED

When (building) using the "Make VS.NET" action (which runs 'devenv') from Visual Build Professional I got the message "The remote server returned an error: (403) Forbidden."
I used "http://localhost/MyWebApp/MyWebApp.csproj" as filename in the "Project/Solution" tab in the Make VS.NET action.

Can anyone maybe tell me how to build an ASP.NET web-application via its project file ?

Regards,

Henk van der Vaart
Build- and Install Architect / Senior Software Engineer

Email: Henk.van.der.Vaart@philips.com

Philips Business Communications B.V
Hilversum, The Netherlands
Reply With Quote
  #2  
Old 12-22-2003, 05:33 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
IIS is blocking access (by default) to .csproj files. You need to add .csproj files to the list of extensions that are accessible via http in order to compile your project in the manner you are using.

Obviously, compiling your project using the .sln file would work without the limitations listed above, but it appears you don't want to use this method...
Reply With Quote
  #3  
Old 12-23-2003, 01:33 AM
Henk v.d. Vaart Henk v.d. Vaart is online now
Registered User
 
Join Date: 10-27-2003
Posts: 7
kevina,

Thanx for the quick response however I still have some questions/problems left.

First of all - where do I check for the accepted extensions. Do you mean the list of 'App Mappings' (via Properties->Home Directory->Configuration)? In this list the .csproj and also .vbproj are listed.

Second when I build manually via the DOS commandline by executing "devenv" the build succeeds (so then no error message).

Any other clues or clarifying remarks would be appreciated.

Henk vd Vaart
Reply With Quote
  #4  
Old 12-23-2003, 11:33 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
You said:
<snip>when I build manually via the DOS commandline by executing "devenv" the build succeeds (so then no error message)</snip>

Did you execute the same command-line call that Visual Build Pro is executing (available in the log when the 'Display the compiler command-line that is used to build each project' checkbox on the Options tab is checked)?

Visual Build Pro also invokes the command-line compiler so it seems most likely there is a difference between what you manually called and what Visual Build Pro called.

If that is the case and you are unable to configure your Make VS.Net step to submit a valid command-line call, please provide the exact command-line call you successfully invoked, and we'll evaluate it.

Kevin
Reply With Quote
  #5  
Old 12-23-2003, 11:53 AM
Henk v.d. Vaart Henk v.d. Vaart is online now
Registered User
 
Join Date: 10-27-2003
Posts: 7
Hi,

The error occurs before the logging of the command-line is done.
So I do NOT know what command line is compose by VisBuild Pro.

I did verify the composed command-line when building a "normal" (non ASP.NET) .NET application (project).

This looks like below (for a normal VB.NET project)
Command: "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com" "C:\Projects\Open BASE\OpenBase.vbproj" /build "Release" /project "C:\Projects\Open BASE\OpenBase.vbproj"

So how to continue?

Henk.
Reply With Quote
  #6  
Old 12-23-2003, 04:23 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
To allow the individual .csproj file to be accessed by the Make VS.NET action, remove .csproj from the Application Mappings for your web application.

Alternatively, specify the project's local .sln file (VS.NET always creates a solution for an individual project when saved from the IDE anyway); when specifying the .sln file, the Make VS.NET action converts each project's http location to a local filename (if it is located on localhost), so it doesn't need to access the file over http.
Reply With Quote
  #7  
Old 12-31-2003, 05:26 AM
Henk v.d. Vaart Henk v.d. Vaart is online now
Registered User
 
Join Date: 10-27-2003
Posts: 7
Thumbs up

Hi Kevin & Kinook

Thanx for the reactions.

I did remove the App Mapping and indeed everything works !!!

I even created a VBScript to remove the .csproj / .vbproj script mappings from the IIS VirtualDir.

I only have one issue to solve.

When building the project it starts with a pre-processing step.
I got an error message like below:
Pre-processing...
http://localhost/directorybrowser/di...r.vbproj...not making target writeable (cannot modify URI files)...not setting properties (cannot update URI files)...not updating version (cannot update URI files)...

How can I address this issue ?? Modify security for IIS WebDir ??


Next to this issue I have one additional question (just for curiousity):
You mentioned "the Make VS.NET action converts each project's http location to a local filename (if it is located on localhost)".
How is this done ??
Reply With Quote
  #8  
Old 12-31-2003, 10:54 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
When building an individual web project file, you won't be able to utilize Make VS.NET capabilities that modify the project (versions, properties, base address, etc.). If you need to do that, you should specify the project's local .sln file in the action instead.

When processing web project(s) in a solution file, the Make VS.NET action goes through various contortions to determine the actual local filename for an http path. See the last section of the Make VS.NET help topic for more details.

We do have it on our list to also support this conversion for individual projects in a future release.
Reply With Quote
  #9  
Old 04-02-2004, 06:42 PM
thomasst thomasst is online now
Registered User
 
Join Date: 03-09-2004
Posts: 6
This doesn't work under 'Default Web Site'

Hi everyone,
I have run into this same problem, and the removal of the extension mappings does work. It just doesn't work for the default web site. I have tested this extensivly and I am unable to build a web project that uses URL references that go through the out-of-the-box default web site. However, I can create a new web site, set it to use the default port (80) and then change the default web site to be using a different port. When I have the same .sln file referencing a web project via 'localhost/virtual directory', the build will always fail if the localhost is set to be using IIS' default web site. I have removed the file extension mappings, added MIME types and everything. Is there any way to get web projects to build through the IIS 6.0 out-of-the-box default web site?

Please let me know if anyone has run into this problem and found an answer. Thanks in advance

Thomas
Reply With Quote
  #10  
Old 04-05-2004, 01:29 AM
Henk v.d. Vaart Henk v.d. Vaart is online now
Registered User
 
Join Date: 10-27-2003
Posts: 7
Hi Thomas,
Below my proven build scenario for ASP.NET projects (for 'Default Web Site' / IIS 5.0) :

1. Delete ASP.NET related VSWebCache sub-folder
2. Create Virtual Directory (target is folder with ASP.NET project).
3. Delete script-maps for .vbproj / .csproj for web-site related virtual folder.
4. Perform VS.NET build step with "http://localhost/%PROJ_VIRTUALDIR%/%PROJ_FILENAME%".

PS
- I did use the project filename (so NOT the solution filename).
- What failure/error message do you get ?
- Maybe IIS 6 behaves different ?

Regards,

Henk.
Reply With Quote
  #11  
Old 04-05-2004, 09:50 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I took a clean W2K3 install and was able to build without any problems. Here were the steps I followed:

1) Added the Server role to Windows (enabling server extensions and ASP.NET).
2) Installed VS.NET 2003.
3) Installed VBP 5.3.
4) Opened VS.NET and created a C# ASP.NET Web App named WebApplication1.
5) Built the new project in VBP via the Make VS.NET action, using the sln file (C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\WebApplication1\WebApplication1.sln) and project file ( http://localhost/WebApplication1/WebApplication1.csproj), configuring the step to increment the file version and set the base address.

Did you enable server extensions and ASP.NET when configuring the Server role? Is there anything else nonstandard about your setup?
Reply With Quote
  #12  
Old 04-05-2004, 11:15 AM
thomasst thomasst is online now
Registered User
 
Join Date: 03-09-2004
Posts: 6
Question

FrontPage Server Extensions are installed as is the ASP.NET component of the server. I tried the idea from the previous post where you remove the VSWebCache folder, and this did not work. There is nothing else odd about my project or my machine. I have removed the .csproj script extension, added a MIME Type to associate the file. I just erased the VSWebCache folder for my username, and it still gives me a 401 error (Unauthorized). I am running a clean win 2k3 server box that sounds pretty much exactly the same as what the admin descfribed. Does anyone have any ideas?
__________________________________________________

So I went back and thought that Server Extensions were the reason the builds were failing. It turns out that if I go to 'configure FP Server Extensions' and configure the machine to allow anonymous access, I do not get this 401 Unauthorized error. Any ideas on how to get the build to work without allowing anonymous access to my entire machine?

Last edited by thomasst; 04-05-2004 at 12:26 PM.
Reply With Quote
  #13  
Old 12-29-2004, 09:49 AM
jaylab jaylab is online now
Registered User
 
Join Date: 06-27-2004
Location: Boston
Posts: 13
VBSscript

Can you share the VBScript you created to VBScript to remove the .csproj / .vbproj script mappings from the IIS VirtualDir?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:09 PM.


Copyright © 1999-2023 Kinook Software, Inc.