Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing dll From Web Root

Status
Not open for further replies.

johnfrederick

Programmer
Sep 30, 2002
34
0
0
US
To develop, I have to make a project and give it a name. ASP.NET makes a directory with that name under the IIS5 root and project builds make a dll with that name in bin. For production, I want to put the main page in the web server root. I can't figure out what to name the dll and how to reference it in the .aspx page header. Currently, in project name: test3, the dll is named test3.dll and the inherits parameter is test3.DL6 where DL6 is the aspx page. I tried making a copy of the dll, naming it test4.dll and changing the inherits parameter to test4.DL6. Browsing it failed with a message about an Number 500 internal server error. Can anyone advise?
 
It sounds like you are making something that is straight forward very difficult.

For production:

You create the web site in IIS.
Ensure that it has the ASPNET_client directory.
Then copy all your files from your development (I assume it is a virtual directory) to the newly created web site.

All should work fine. A problem you do come across is if you are referencing the location and files within your application, cause now it is at the root of the URL where before it was after the (This is of course if you had it in a virutal directory).



Does that answer your question?


AGIMA where professional web hosting is our business.

AGIMA Computing
 
Thanks, AGIMA, for your prompt response to my call for help.
1. In my above example, I assume what you refer to as the "ASPNET _client directory" would be test3. If I'm putting my pages in the root, there will not be a directory with that name on the production server.
2. You point out a problem with my proposal. Unless I use the same directory structure for my pages and my Access mdbs(the system bin is not a problem), I'll have to edit URLs and connection strings every time I move something from development to the production site. Don't want to have to do that.
3. Second thought on 3. My Web Hosting cos'. standard setup provides for a directory named database with read/write permissions under the root(the one I'm currently using with a reference that says go up one level(from test3) and down into database. However, they have another one at the root level. If I put the page with the connection string in the root and my Access mdbs in that other database directory, the same reference will work.
Thanks again for your help.
 
AGIMA, I may have misunderstood you. I see that my IIS5 installation has a directory named "aspnet_client" under the root. What is that for?
 
The aspnet_client directory stores jscript files that .Net needs, it is also a location where you can store you own jscript files.

Here is a bit of code that I use to detect if I am working from a virutal directory (On my development machine).


If Me.Request.ServerVariables(&quot;SERVER_NAME&quot;) <> &quot; Then
ServerPath = &quot;/ Else
ServerPath = &quot;&quot;
End If

If I am running from a virutal directory the Me.Request.ServerVariables(&quot;SERVER_NAME&quot;) will return localhost but once I move the site onto the production server it returns


AGIMA where professional web hosting is our business.

AGIMA Computing
 
Thanks for your patience, AGIMA. It doesn't sound like the jscript and virtual directories have anything to do with my problem. My question is:
1. If I develop a project named test3, I get a real directory named test3 under my local IIS5 root, a dll named test3.dll in bin, which apparently contains the code-behind logic for all the aspx pages in the project, and an Inherits parameter in the aspx header of Page1, for example, referencing test3.Page1.
2. In production, I would like to put the aspx page in the root, so there is no test3 directory. The question is:
a. What do I name the dll?
b. How do I reference it in the aspx page header?
Thanks again for your help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top