aspx form works in Visual Studio web server but not on my main IIS web server.


Hi all,
 I have a simple form that works fine in the VS local web server but when I copy the files (index.aspx, index.aspx.vb, web.config) to my IIS server I can see the form but when I click the hyperlink the form doesn't work. It is as if the .aspx can't execute the .aspx.vb page.
Any ideas why this would be? 
This is my first asp.net project so I am a complete novice here. Thanks.
 My aspx code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="login.aspx.vb" Inherits="Default2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
        <asp:LinkButton ID="LnkNext" runat="server">Next</asp:LinkButton>     'When I click the link here the box below txtaddress is made visible only the link doesn't work on IIS!
        <asp:TextBox ID="txtaddress" runat="server" Visible="False"></asp:TextBox>
        <asp:Button ID="btnSubmit" runat="server" Text="Login" Visible="False" />
       </div>
    </form>
</body>
</html>
0
swd2002
7/5/2007 3:31:58 PM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 4 followers.

💬 5 Replies
👁️‍🗨️ 1511 Views



Hey,
Does the web server have the right .NET framework installed?  Also, does IIS have it setup to use the correct .NET framework version (a new feature with ASP.NET 2.0; right-click your virtual, select properties, and there is an ASP.NET tab).

Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
0
bmains
7/5/2007 4:47:12 PM
Post the index.aspx.vb code too.

MCTS in ASP.NET
0
jonathanparker
7/5/2007 4:56:06 PM

Are you using .NET 1.x or 2.0?  It appears that you are using .NET 1.x.  If this is the case then the reason it work locally is because when you start the project with Visual Studio by pressing F5 it first builds the application.  The build process compiles all of your .vb files (code behind files) into a .dll file that resides in the bin folder of the virtual directory.  You can use copy & paste deployment but you must remember to copy the bin directory too.
 .NET 2.0 on the other hand has a feature called dynamic compilation.  This allows you to copy the source files (.aspx & .vb) to the virtual directory and then simply browse to it but you can't do that in .NET 1.x.
 I hope this helps!
Al
0
alraiani
7/5/2007 5:13:00 PM

Hi,
 Thanks for the suggestions, I wasn't compiling the program so I had no dll. I've discovered 'Publish Web Site' from the build menu. I can't believe I haven't seen that before!
Unfortunatley the site still doesn't work from domain connected PCs but it does work in IE on the web server using the same URL. This looks like permissions, any ideas what this maybe?
I am using .Net 2.0 VS 2005 and I have the IIS site setup to use .Net 2.0, .Net 1.1 is disabled on the IIS server.
Many thanks.
0
swd2002
7/6/2007 8:03:15 AM
what is the actual error you are getting? Have you set up a virtual directory for the webapp folder your source files reside in?

Rgds
Dave!
0
dcallan
7/6/2007 10:22:08 AM
Reply:

Similar Artilces: