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" >
<form id="form1" runat="server">
<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" />
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).
"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).
Post the index.aspx.vb code too.
MCTS in ASP.NET
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!
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.
what is the actual error you are getting? Have you set up a virtual directory for the webapp folder your source files reside in?