Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
plz help me guys i am creating one project website in visual studio . i want to run this project without visual studio any pc . like my project directly run my frnd pc without any changes?

db is also there in my project...
Posted

You need IIS installed to be able to run an ASP.Net website. Visual Studio comes with a "hidden" version of IIS which is why you can run it through Visual Studio without actually having IIS.

However, IIS is what you must have. It is free on Microsoft's site.
 
Share this answer
 
Hello Sandy, you can host the website on your machine without having vs.net on it. Just make sure you have IIS setup on the system.
Below URL will help
Deploying ASP.NET Websites on IIS 7.0 [^]
 
Share this answer
 
To run the application without opening Visual Studio, You need to install IIS (as rtpHarry has suggested). Then You need to have your application in a virtual directory. To create virtual directory perform following steps:

Type inetmgr at command prompt -> Click OK.
Expand .....(local computer) from the left panel
Expand WebSites
Right Click on Default Web Site -> New -> Virtual Directory....
Click Next
Choose a alias name for the virtual directory.
Click Browse.. -> Make a New Folder at your desired location (anywhere in the Hard Drive)
Click Next.
At Access Permissions window Check all the check boxes.
A warning window will appear, click Yes.
Click Next -> Finish.
Now create your application in the virtual directory. For this in the Visual Studio Click New WebSite, then in the open window choose HTTP in the Location DropDownList, then browse to your virtual directory (choose Local IIS in the left panel, the directory name will appear by its alias name) and name your application (after giving a slash ' / ' to the alias name of virtual directory).

Now you can run your web site by typing the path of your website in the Run window somthing like this:

http://localhost/vd/MySite/Default.aspx

where vd is the alias name of virtual directory and MySite is the web site name.

Hope it'll help you.
 
Share this answer
 
Comments
Sandy W 17-Oct-14 2:26am    
thanks
XML
<%@ Page clienttarget=downlevel %>

<html>
<head>
    <script language="VB" runat="server">

        Sub Button1_Click(sender As Object, e As EventArgs)
           rangeValInteger.Validate()
           If (rangeValInteger.IsValid) Then
               lblOutput1.Text = "Result: Valid!"
           Else
               lblOutput1.Text = "Result: Not Valid!"
           End If

           rangeValDate.Validate()
           If (rangeValDate.IsValid) Then
               lblOutput2.Text = "Result: Valid!"
           Else
               lblOutput2.Text = "Result: Not Valid!"
           End If

           rangeValString.Validate()
           If (rangeValString.IsValid) Then
               lblOutput3.Text = "Result: Valid!"
           Else
               lblOutput3.Text = "Result: Not Valid!"
           End If

           If (Page.IsValid) Then
              lblOutput.Text = "Result: Page Valid!"
           Else
              lblOutput.Text = "Result: Page Not valid!"
           End If
        End Sub

   </script>

</head>
<body>

    <h3><font face="Verdana">RangeValidator Sample</font></h3>
    <br /><br />

    <form runat="server">

      <table bgcolor="#eeeeee" cellpadding=10>
      <tr valign="top">
        <td>
            <h5><font face="Verdana">Value to Check:</font></h5>
            <asp:TextBox id="txtComp1" runat="server"/>
        </td>
        <td>
            <h5><font face="Verdana">Data Type: Integer Min(1), Max(10)</font></h5>
        </td>
        <td>
             <asp:Label id="lblOutput1" Font-Names="verdana" Font-Size="10pt" runat="server" />
        </td>
      </tr>
      <tr valign="top">
        <td>
            <h5><font face="Verdana">Value to Check:</font></h5>
            <asp:TextBox id="txtComp2" runat="server"/>
        </td>
        <td>
            <h5><font face="Verdana">Data Type: Date Min(2000/1/1), Max(2001/1/1)</font></h5>
        </td>
        <td>
             <asp:Label id="lblOutput2" Font-Names="verdana" Font-Size="10pt" runat="server" />
        </td>
      </tr>
      <tr valign="top">
        <td>
            <h5><font face="Verdana">Value to Check:</font></h5>
            <asp:TextBox id="txtComp3" runat="server"/>
        </td>
        <td>
            <h5><font face="Verdana">Data Type: String Min(Aardvark), Max(Zebra)</font></h5>
        </td>
        <td>
             <asp:Label id="lblOutput3" Font-Names="verdana" Font-Size="10pt" runat="server" />
        </td>
      </tr>
     </table>

     <asp:Button Text="Validate" ID="Button1" onclick="Button1_Click" runat="server" />

     <asp:RangeValidator
        id="rangeValInteger"
        Type="Integer"
        ControlToValidate="txtComp1"
        MaximumValue="10"
        MinimumValue="1"
        runat="server"/>

     <asp:RangeValidator
        id="rangeValDate"
        Type="Date"
        ControlToValidate="txtComp2"
        MaximumValue="2001/1/1"
        MinimumValue="2000/1/1"
        runat="server"/>

     <asp:RangeValidator
        id="rangeValString"
        Type="String"
        ControlToValidate="txtComp3"
        MaximumValue="Zebra"
        MinimumValue="Aardvark"
        runat="server"/>
     <br>

     <asp:Label id="lblOutput" Font-Names="verdana" Font-Size="10pt" runat="server" />

    </form>

</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900