Saturday, March 31, 2012

what is needed for asp.net

what is needed to run a asp.net program on my local machine. I have iis, asp.net sdk framework 1.1. What else is needed? Do I need that Cassini web server.You only need IIS and the .NET Framework installed on the machine (in that order!). The Cassini web server is a little web server which can be used if you don't have IIS (for example on Windows XP Home).
I have windows xp professional. Ok, what do you type in browser to get to my asp.net page? Obviously not www/
do I type local/
?
http://localhost/folder/filename.aspx
another question relating. I have a file in my computer in C:\NetworkEvolution\Project2\TCInOutTile\inoutBoard.aspx
I typed in http://localhost/networkevolution/Project2/TCInOutTile/inoutBoard.aspx
my
and I got the error

Server Error in '/' Application.
------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested Url: /networkevolution/Project2/TCInOutTile/inoutBoard.aspx
------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

in regular asp I have the personal web server and had to alias the directory do I need to do something similar here? And does

 runat="server"/
have anything to do with that.

Here is contents of file:


<HTML>
<HEAD>
<TITLE>In-Out Board</TITLE>
</HEAD>
<BODY>
<FORM runat="server">
<TABLE CELLPADDING='6' CELLSPACING='0' ALIGN='center'>
<TR>
<TD COLSPAN='2' ALIGN='center'><IMG SRC='./images/InOut.jpg' BORDER='0' HSPACE='20'><FONT SIZE="+4" FACE="Arial">NE In/Out</FONT><IMG SRC='./images/InOut.jpg' BORDER='0' HSPACE='20'></TD>
</TR>
<TR>
<TD WIDTH='125'><FONT FACE="Arial">Login Name: </FONT></TD>
<TD>
<ASP:TextBox id="LoginNameBox" Width="50" MAXLENGTH="30" runat="server"/></TD>
<td>
<asp:RequiredFieldValidator id="RequiredFieldValidatorname"
ControlToValidate="LoginNameBox"
ErrorMessage="*"
Display="Static"
Width="100%" runat="server">
</asp:RequiredFieldValidator>
</td>
</TR>
<TR>
<TD><FONT FACE="Arial">Password: </FONT></TD>
<TD><ASP:TextBox id="passwordBox" Width="20" MAXLENGTH="16" TextMode="Password" runat="server"/></TD>
</TR>
<td>
<asp:RequiredFieldValidator id="RequiredFieldValidatorpassword"
ControlToValidate="passwordBox"
ErrorMessage="*"
Display="Static"
Width="100%" runat="server">
</asp:RequiredFieldValidator>
</td>
<TR>
<TD COLSPAN="3" ALIGN="center" HEIGHT='50'>
<ASP:Button id=Button1 text="Validate" runat=server /></TD>
</TR>
</TABLE>
</FORM
</BODY>
</HTML

any help is appreciated. I am working on a project for employer and am trying to get asp.net going on my local home computer for working at home. Thank you.
What do you mean in that order?? Do you have to install IIS before the .NET Framework? If so maybe that is why I am having this trouble. I am sorry if this has already been answered, I am new to this forum.

1. I installed Windows XP professional (without IIS, didn't need it at the time)
2. I installed the .NET Framework 1.1 today
3. I then installed the ASP.MATRIX
4. I then installed IIS to do the turtorials on the Matrix page.

I really do not know how to explain this, but when I do the tutorial using the IIS instead of the built in server, the only thing that shows up in my browser is the word "label" I have no button or textbox like I did just running the built in server. I followed the directions exactly. What am I doing wrong? What do I need to configure? New to IIS.

Here is the exercise I am trying to do:
http://www.asp.net/webmatrix/guidedtour/section1/runviaiisweb.aspx

Here is the output: "label" that is all that appears on the screen. Where is my button and textbox from the prior exercise??

Here is what my address bar says:http://localhost/MatrixTour/myFirstPage.aspx and the word "label" on the screen.

Please help me. What am I doing wrong?? Thanks, Dave
If you did not have IIS installed when the framework was installed, you need to:

Find aspnet_regiis.exe
In that folder, run: aspnet_regiis -i

This will set all folders to run the ASP.NET framework. Had IIS been installed before the framework, this would have been handled dusing the installation.
Okay I ran the aspnet_regiis /i in a command line window and it installed fine. I then ran my turorial again (the one to use IIS) and this is what I get now.

Server Error in '/MatrixTour' Application.
------------------------

Server cannot access application directory 'D:\Documents and Settings\Administrator.ME.000\My Documents\'. The directory does not exist or is not accessible because of security settings.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access application directory 'D:\Documents and Settings\Administrator.DAVE.000\My Documents\'. The directory does not exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Server cannot access application directory 'D:\Documents and Settings\Administrator.DAVE.000\My Documents\'. The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +965
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128

What does all that mean? Am I getting closer??

Thanks,

Dave
I expect that the application folder is not an application in IIS. If you make it so, perhaps that will work. I am not an expert in Web Matrix, and do not know what the implications of doing this are for that tool.
the IIS server can only deliver pages in its directory structure (usually located under the "inetpub" directory); it will not deliver any page from the hard drive).

AutoFed
That is not entirely true. You can configure any folder anywhere on the machine to be an IIS virtual folder. You are correct that IIS will not just serve files from anywhere. You could add the folder c:\test\folder to be, say, http://localhost/test/folder if you wish, or really practically any name you wish.
of course; I simply meant that you cannot equate "c:\" with "http://localhost", which seemed to be what was happening.

AutoFed
thank you, but how do I configure A directory like that? I knew how on my old 98se machine but that had personal web server and was with asp. Now with Windows xp pro and asp.net and iis I have no idea.
in IIS, you need to create a Virtual Directory. Open IIS, then right-click on the directory that you want tocontain the virtual directory (if you want the directory to be top level, right click on "Default Web Site"). Then go to "New", "Virtual Directory". It will ask you what you want the name of the Virtual Directory; you can name it the same as the actual directory, or something else if you want. Then it will ask you the actual location of the directory you want to refer to. You can then access the directory through "http://localhost/containing-directory/virtual-directory" (or if you clicked on "Default Web Site", "http://localhost/virtual-directory")

AutoFed
Ok
when I got new computer (win xp pro) in June this year it had no check mark by iis in windows components wizard.
I checked it and all the iss sub-component and installed it using win xp pro CD.
Then I install server 2000 tools and then the asp.net sdk.
Can't seem to find where to open iis to set virtual directory.
What is it under in all programs or where is it that I could create my own shortcut to get to opening iss? It doesn't seem to be in all programs or all programs accessories.
Please help getting close to needing it for a deadline.
Thank you for any assistance.

0 comments:

Post a Comment