Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

Why won't my asp.net page run

When I run any page using asp.net in Dreamweaver CS3 all I get displayed is the code.  
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet 
id="dsStaff"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_connIVOLaw") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_connIVOLaw") %>'
CommandText='<%# "SELECT *  FROM dbo.tblstaff" %>'
Debug="true" PageSize="10"
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/IVOLawmain.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form runat="server">
  <asp:DataGrid id="dgStaff" 
  runat="server" 
  AllowSorting="False" 
  AutoGenerateColumns="false" 
  CellPadding="3" 
  CellSpacing="0" 
  ShowFooter="false" 
  ShowHeader="true" 
  DataSource="<%# dsStaff.DefaultView %>" 
  PagerStyle-Mode="NextPrev" 
  AllowPaging="true" 
  AllowCustomPaging="true" 
  PageSize="<%# dsStaff.PageSize %>" 
  VirtualItemCount="<%# dsStaff.RecordCount %>" 
  OnPageIndexChanged="dsStaff.OnDataGridPageIndexChanged" 
>
    <HeaderStyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />
    <ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
    <AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
    <FooterStyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />
    <PagerStyle BackColor="white" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
    <Columns>
      <asp:BoundColumn DataField="lngSTID" 
        HeaderText="lngSTID" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="lngSTPLID" 
        HeaderText="lngSTPLID" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTTitle" 
        HeaderText="txtSTTitle" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTLastName" 
        HeaderText="txtSTLastName" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTFirstName" 
        HeaderText="txtSTFirstName" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTReportCode" 
        HeaderText="txtSTReportCode" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTJobDesc" 
        HeaderText="txtSTJobDesc" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="lngSTPhoneExt" 
        HeaderText="lngSTPhoneExt" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTEmail" 
        HeaderText="txtSTEmail" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="lngSTLALID" 
        HeaderText="lngSTLALID" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTUsername" 
        HeaderText="txtSTUsername" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="txtSTPassword" 
        HeaderText="txtSTPassword" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="dteSTAdded" 
        HeaderText="dteSTAdded" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="dteSTDeleted" 
        HeaderText="dteSTDeleted" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="dteSTAmended" 
        HeaderText="dteSTAmended" 
        ReadOnly="true" 
        Visible="True"/>
      <asp:BoundColumn DataField="lngSTInactive" 
        HeaderText="lngSTInactive" 
        ReadOnly="true" 
        Visible="True"/>
    </Columns>
  </asp:DataGrid>
</form>
</body>
</html>

Open in new window

0
annecham
Asked:
annecham
  • 3
  • 3
1 Solution
 
Jones911Commented:
Do you have IIS and asp installed?
0
 
RouchieCommented:
After installing IIS with ASP support you must then install the .NET framework.

 1) IIS
     http://www.webwizguide.com/kb/asp_tutorials/installing_iis_winXP_pro.asp
 2) ASP
     http://www.webcheatsheet.com/asp/asp_install.php
 3) .NET
     http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en (you may also need version 1 & 2 as these are different)

Then access your web site via your new web server like this http://localhost/mywebsitedir/mypage.aspx  and not like this C:\inetpub\wwwroot\mysite\mypage.aspx
0
 
annechamAuthor Commented:
Yes, I am running IIS 6, .net 3.5 and I have 1 and 2 installed and SDk 1.1.  My server is working fine for aspx files that don't have any asp controls on them and .html files.  As soon as I add a call to the dataset it just stops working.  No error message or anything.  Really frustrating.  I have spent so long on this problem that I'm determined to get it to work.  I currently have my testing server 1 level down from wwwroot in a sub directory.  My dreamweaverctls.dll is in both a /bin at wwwroot level and at the subdirectory level for good measure!!  I've added the .dll on the web server tab in dreamweaver just to try but nothing seems to make a difference.  It is so nearly working.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
RouchieCommented:
DLL's must go in the BIN directory, and the BIN directory must be in the root of the web site.

Dreamweaver in general provides appalling ASP.NET support, and to further make life hard for some reason Macromedia decided to write their own DLL's for data access.  This was a bizarre choice because it meant that when things go wrong, the problem is nearly impossible to debug.  Also there was no documentation to explain just how these things worked.  It was all about the DW interface being able to utilize them in the background and not the programmer in code view.

Here's what I would advise:

  1)  Create a test directory, C:\inetpub\wwwroot\newsite
  2)  Open IIS and turn the directory into an application (right-click, properties, virtual directory, application name -> create)
  3)  Then go download Microsoft's free ASP.NET editor, Visual Web Developer 2008 (http://www.microsoft.com/express/download/)
  4)  Open your new web directory in the software
  5)  Create a new ASPX file called mypage.aspx and drop some web controls in there
  6)  Run the page using the RUN IN BROWSER button (this uses VSWD's built-in server)
  7)  Then run the site using IIS via the URL  http://localhost/newsite/mypage.aspx

If the page runs in either VSWD or IIS then Dreamweaver is at fault and should be abandoned :-\

There is a wealth of free ASP.NET tutorials for VSWD here http://www.asp.net/learn/videos/
0
 
annechamAuthor Commented:
Hi Rouchie, Thanks for your comments.  I decided to try one more time before giving up and guess what it worked!!  I uninstalled the Adobe Master suite off my computer, reinstalled Dreamweaver and Acobat only.  Deleted the virtual website in IIS.  Created a subdirectory under wwwroot to use as testing server directory.  I've created three forms this morning, one using just 1 field and it worked, thought I'll be brave and try an update wizard form, it worked and have just created spry fields and they are working!  Guess you should start with a completely new computer if you want to do this.  Thanks for your help, I'll continue with Dreamweaver for this project and do the next one in VSWD.
0
 
annechamAuthor Commented:
Thanks
0
 
RouchieCommented:
>> Guess you should start with a completely new computer if you want to do this

LOL you're not the first to think that...
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now