Is it me or is there some trick to publishing a web site?

T

Ty

Hello all,
I have built a site in VS 2008. using IIS7. Site works fine. So I
publish to a local folder. I then go into IIS7 and add a virtural
directory pointing to the compiled folder and make it an application.
When I try to browse the site from IIS7 I get an error that a file was
not found.

This file is the aspx.vb page of the page I am loading which in the
published site has been renamed to App_Web_50e5-xmr.dll and placed
into the bin folder.

Now this is the first site I've ever created and I admit that I do
know much but doesn't it seem logical that the site would know where
it placed its own files????

Help.....Please

Ty
 
A

Andy B

You don't browse to the aspx.vb file. You just want to browse to a .aspx
file like default.aspx.
 
T

Ty

You don't browse to the aspx.vb file. You just want to browse to a .aspx
file like default.aspx.








- Show quoted text -

Hello Andy,
I'm not browsing the aspx.vb file I'm loading the login page and it
gives the error that the login.aspx.vb page (which has been renamed
and moved to the bin folder) is missing.

Ty
 
A

Andy B

That is an interesting error. if you load the aspx page into the designer
and view the source, what does the top line say?

It should be an @page directive of some kind.


You don't browse to the aspx.vb file. You just want to browse to a .aspx
file like default.aspx.








- Show quoted text -

Hello Andy,
I'm not browsing the aspx.vb file I'm loading the login page and it
gives the error that the login.aspx.vb page (which has been renamed
and moved to the bin folder) is missing.

Ty
 
T

Ty

That is an interesting error. if you load the aspx page into the designer
and view the source, what does the top line say?

It should be an @page directive of some kind.






Hello Andy,
   I'm not browsing the aspx.vb file I'm loading the login page and it
gives the error that the login.aspx.vb page (which has been renamed
and moved to the bin folder) is missing.

Ty- Hide quoted text -

- Show quoted text -

Andy,
I'm glad you asked that. Here is the line
<%@ page language="VB" src="LdapAuthentication.vb" masterpagefile="~/
TestMaster.master" autoeventwireup="false" inherits="Login2,
App_Web_50e5-xmr" title="FastTrack - Login" %>

The interesting part is this src="LdapAuthentication.vb". In my site
before it is compiled this is the file that handles logging into
Active Directory and is located in the root folder and does not have
an associated aspx page. Now in the compiled site the the file is
moved into the bin folder but has not been renamed but the type is
listed as compiled file. So this line src="LdapAuthentication.vb" is
underlined and the popup says file missing.

I assume this is because the file is just a vb file and not a aspx.vb
file. Wonder what I have to do. I'm going to try to move it to the
root folder in the compiled folder.

Ty
 
T

Ty

Andy,
   I'm glad you asked that. Here is the line
<%@ page language="VB" src="LdapAuthentication.vb" masterpagefile="~/
TestMaster.master" autoeventwireup="false" inherits="Login2,
App_Web_50e5-xmr" title="FastTrack - Login" %>

The interesting part is this src="LdapAuthentication.vb". In my site
before it is compiled this is the file that handles logging into
Active Directory and is located in the root folder and does not have
an associated aspx page. Now in the compiled site the the file is
moved into the bin folder but has not been renamed but the type is
listed as compiled file. So this line src="LdapAuthentication.vb" is
underlined and the popup says file missing.

I assume this is because the file is just a vb file and not a aspx.vb
file. Wonder what I have to do. I'm going to try to move it to the
root folder in the compiled folder.

Ty- Hide quoted text -

- Show quoted text -

That did not work. Any thoughts.

Ty
 
A

Andy B

Is this a website project or a web application project? I have a web
application project and this is what one of my @page directives looks like:

<%@ Page Title="Eternity Records - Home" Language="vb"
AutoEventWireup="false" MasterPageFile="~/Site.Master"
CodeBehind="index.aspx.vb" Inherits="WebRoot.index" %>



Notice the codebehind and the inherits attributes that were missing from
your directive. The one you gave was a little wierd looking. What version of
visual studio are you using? If I remember the website version of codebehind
would be codefile.
 
T

Ty

Is this a website project or a web application project? I have a web
application project and this is what one of my @page directives looks like:

<%@ Page Title="Eternity Records - Home" Language="vb"
AutoEventWireup="false" MasterPageFile="~/Site.Master"
CodeBehind="index.aspx.vb" Inherits="WebRoot.index" %>

Notice the codebehind and the inherits attributes that were missing from
your directive. The one you gave was a little wierd looking. What versionof
visual studio are you using? If I remember the website version of codebehind
would be codefile.

A web site.
Here is the uncomplied directive
<%@ Page Language="VB" Src="LdapAuthentication.vb" MasterPageFile="~/
TestMaster.master" AutoEventWireup="false" CodeFile="Login2.aspx.vb"
Inherits="Login2" title="FastTrack - Login" %>
<%@ MasterType VirtualPath="~/TestMaster.master" %>

Here is the compiled directive.
<%@ page language="VB" src="LdapAuthentication.vb" masterpagefile="~/
TestMaster.master" autoeventwireup="false" inherits="Login2,
App_Web_50e5-xmr" title="FastTrack - Login" %>
<%@ MasterType VirtualPath="~/TestMaster.master" %>

This page is unique in that It has a aspx.vb page and also refrences
another vb file named LdapAuthentication.vb that is required for
Authentication with my Active Directory. I'm using form
authentication.

Now here is a regular page in my project.

Uncompiled
<%@ Page Language="VB" MasterPageFile="~/TestMaster.master"
AutoEventWireup="false" CodeFile="Announce.aspx.vb"
Inherits="Announce" title="FastTrack - Announce" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ MasterType VirtualPath="~/TestMaster.master" %>

As you can see there is no "src" part in this directive.

Compiled

<%@ page language="VB" masterpagefile="~/TestMaster.master"
autoeventwireup="false" inherits="Announce, App_Web_50e5-xmr"
title="FastTrack - Announce" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ MasterType VirtualPath="~/TestMaster.master" %>

Is it normal for the compiled page to remove the "CodeFile" part and
change the "Inherits" tag?

Ty
 
R

Rich P

Greetings,

If your website is a web application - try this:

Create a virtual directory in the Default Website directory of IIS and
copy all of your application files to here, then in the Application Pool
Folder create a new application pool and name it anything you want.
Then back to your virtual directory you just created in the Default
Website at the bottom of the properties dialog is a textbox named
application pool. Enter the name of the appication pool you just
created in the Application Pool folder. then call your site like this:

http://yourservername/yourvirtualdir/youwebapp.aspx

If this still doesn't work then do this:

go back to IIS to the Application Pool folder to the Application Pool
you just created and right click on it. Then click on "recycle". That
should get it.

hth

Rich
 
T

Ty

Greetings,

If your website is a web application - try this:

Create a virtual directory in the Default Website directory of IIS and
copy all of your application files to here, then in the Application Pool
Folder create a new application pool and name it anything you want.
Then back to your virtual directory you just created in the Default
Website at the bottom of the properties dialog is a textbox named
application pool.  Enter the name of the appication pool you just
created in the Application Pool folder. then call your site like this:

http://yourservername/yourvirtualdir/youwebapp.aspx

If this still doesn't work then do this:

go back to IIS to the Application Pool folder to the Application Pool
you just created and right click on it.  Then click on "recycle".  That
should get it.

hth

Rich

*** Sent via Developersdexhttp://www.developersdex.com***

Rich,

In VS it's a website but in IIS it is configured as a application. I
have done what you suggested on my test server only I called like this
Http://localserver/FastTrack/login.aspx

I'll have to try calling it your way when I get back to work.

I also created the compiled site as an application on my development
machine just to make sure there was not a IIS problem because my test
server is IIS6 and my dev machine is IIS7 although I left it in the
default pool and instead of opening a browser windw and calling the
app I choose Browse from the menu in IIS7.

I'm getting the same error on both machnes. I'm starting to think that
the issue is that extra VB file for the login page? Maybe I need to
place all the code for that directly into the login.aspx.vb page and
see if that makes a diffrence.

Ty
 
A

Andy B

Try putting all of the code related to the page itself inside the codefile
and see what happens. I don't even know if there is such a thing as the src
attribute for the @page directive.


Greetings,

If your website is a web application - try this:

Create a virtual directory in the Default Website directory of IIS and
copy all of your application files to here, then in the Application Pool
Folder create a new application pool and name it anything you want.
Then back to your virtual directory you just created in the Default
Website at the bottom of the properties dialog is a textbox named
application pool. Enter the name of the appication pool you just
created in the Application Pool folder. then call your site like this:

http://yourservername/yourvirtualdir/youwebapp.aspx

If this still doesn't work then do this:

go back to IIS to the Application Pool folder to the Application Pool
you just created and right click on it. Then click on "recycle". That
should get it.

hth

Rich

*** Sent via Developersdexhttp://www.developersdex.com***

Rich,

In VS it's a website but in IIS it is configured as a application. I
have done what you suggested on my test server only I called like this
Http://localserver/FastTrack/login.aspx

I'll have to try calling it your way when I get back to work.

I also created the compiled site as an application on my development
machine just to make sure there was not a IIS problem because my test
server is IIS6 and my dev machine is IIS7 although I left it in the
default pool and instead of opening a browser windw and calling the
app I choose Browse from the menu in IIS7.

I'm getting the same error on both machnes. I'm starting to think that
the issue is that extra VB file for the login page? Maybe I need to
place all the code for that directly into the login.aspx.vb page and
see if that makes a diffrence.

Ty
 

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