Link to home
Start Free TrialLog in
Avatar of ddei
ddei

asked on

aspx page does not load in Windows 2003/IIS

We are working on  reporting project in asp.net.
I have a page that is working perfectly fine in Windows XP/IIS setup. But it does not work in Windows 2003/IIS.

There are no errors displayed. The page never loads.

I guess the problem is regarding permissions, and probably it is with the 'GetObject' call.  I have given all the permissions to the
NETWORK SERVICE account in Win2003 server, and did modify DCOM configuration.

Your help is greatly appreciated. Please let me know if you need more information.

This is the code:
-----------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="gantt.aspx.vb" Inherits="gantt" Debug="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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
   
    <form id="form1" runat="server">
    <div>
        <br />
        <asp:Label ID="Label1" runat="server" BackColor="#C0C000" BorderColor="Black" BorderStyle="Solid"
            BorderWidth="1px" Text="Gantt Chart For:" Width="112px"></asp:Label>&nbsp;
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="GanttConn" DataTextField="Airline"
            DataValueField="Airline" AutoPostBack="true">
        </asp:DropDownList>
        <asp:RadioButtonList ID="RadioButtonList1" runat="server">
       
        </asp:RadioButtonList>
        <!-- Start Milestone code --><%
                                         Dim oMiles
                                         Dim ImageName
                                         Dim FullPathImageName
                                         Dim WWWPathImageName
               
                                         Dim szTaskName
                                         Dim szStartDate
                                         Dim szEndDate
                                         Dim szDuration
                                         Dim schStartDate
                                         Dim schEndDate
                                         Dim RowNumber As Integer = 0
                                                               
                                         ' Create the Milestones object using a file on the web server
                                         oMiles = GetObject("c:\Inetpub\wwwroot\WebChart\worknew\Gantt Chart for Milestones.mla")
                                         'Activate Milestones
                                         oMiles.Activate()
                                         oMiles.Refresh()
                                     
                                         ' Get schedule start date and end date
                                         schStartDate = Date.Now()
                                         schEndDate = Date.Now ()
                                         Dim startDateList As System.Data.DataView = CType(SqlDataSource2.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
                                         For Each rowStartDate As System.Data.DataRowView In startDateList
                                             schStartDate = rowStartDate("minStartDate")
                                         Next
           
                                         Dim endDateList As System.Data.DataView = CType(SqlDataSource3.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
                                         For Each rowEndDate As System.Data.DataRowView In endDateList
                                             schEndDate = rowEndDate("maxEndDate")
                                         Next
       
                                         oMiles.setStartAndEndDates(schStartDate, schEndDate)
                                         ' Read data from data source
                                         Dim taskList As System.Data.DataView = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), System.Data.DataView)

                                       
                                       
                                         'Loop through each record
                                         For Each rowTask As System.Data.DataRowView In taskList
                                             RowNumber = RowNumber + 1
                   
                                             szTaskName = rowTask("Milestone").ToString()
                                             szStartDate = rowTask("Start_Date")
                                             szEndDate = rowTask("Finish_Date")
                                             szDuration = rowTask("Duration")
                   
                                                                     
                                             oMiles.PutCell(RowNumber, 1, szTaskName)
                                             'oMiles.SetOutlineLevel(RowNumber, "1")
                                             If (IsDate(szStartDate)) Then
                                                 oMiles.AddSymbol(RowNumber, szStartDate, 1, 1, 2)
                                             End If

                                             If (IsDate(szEndDate)) Then
                                                 oMiles.AddSymbol(RowNumber, szEndDate, 2)
                                             End If
                                         Next
               
                                         oMiles.Refresh()
                                                                 
                                         Randomize()
                                         ImageName = "filtout" + CStr(Rnd()) + ".jpg"
                                         FullPathImageName = "C:\Inetpub\wwwroot\images\" + ImageName
                                         WWWPathImageName = "http://localhost/images/ " + ImageName
                                         'Generate Bitmap
                                         oMiles.SaveBitmap(FullPathImageName)
                                         oMiles.Close ("NoSave")

                                         'Show the Bitmap in the user's browser
                                         Response.Write("<p><img src=""" + WWWPathImageName + """></p>")

        %><!-- End Milestone code --><br />
        <br />
        <asp:SqlDataSource ID="GanttConn" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            ProviderName="<%$ ConnectionStrings:CMSConnectionString.ProviderName %>" SelectCommand="SELECT DISTINCT Airline FROM rpt_fact_gantt">
        </asp:SqlDataSource>
        &nbsp;&nbsp;
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            ProviderName="<%$ ConnectionStrings: CMSConnectionString.ProviderName %>" SelectCommand="SELECT * FROM rpt_fact_gantt WHERE (Airline = ?)">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="Airline" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            ProviderName="<%$ ConnectionStrings:CMSConnectionString.ProviderName %>" SelectCommand="SELECT MIN(Start_Date) As minStartDate FROM rpt_fact_gantt WHERE (Airline = ?)">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="Airline" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            ProviderName="<%$ ConnectionStrings: CMSConnectionString.ProviderName %>" SelectCommand="SELECT MAX(Finish_Date) As maxEndDate FROM rpt_fact_gantt WHERE (Airline = ?)">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="Airline" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
       
   
    </div>
    </form>
</body>
</html>
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Hi, do other ASP.NET pages load fine on this server?
Avatar of ddei
ddei

ASKER

Yes, All other ASP.NET pages of the reporting web application load correctly on this server.
SOLUTION
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddei

ASKER

FileMon Results:
-------------------

5:21:29 PM      w3wp.exe:5196      QUERY INFORMATION      C:\Inetpub\wwwroot\WebChart\worknew\Gantt Chart for Milestones.mla      SUCCESS      Attributes: A      
5:21:29 PM      w3wp.exe:5196      QUERY INFORMATION      C:\Inetpub\wwwroot\WebChart\worknew\Gantt Chart for Milestones.mla      SUCCESS      Attributes: A      
5:21:29 PM      w3wp.exe:5196      READ      C:\Inetpub\wwwroot\WebChart\worknew\Gantt Chart for Milestones.mla      SUCCESS      Offset: 0 Length: 4      
Looks like permissions are OK (at least from this part od log file). What about commenting out the oMiles object as I said in my previous post?
Avatar of ddei

ASKER

Yes, Without oMiles object code, the page loads fine. It displays the drop down list on the page.
When I compared the FileMon results of WinXP and Win2003, I noticed that the Miles.exe is not started in Win2003 server. The process w3wp.exe is not even attempting to READ Miles.Exe in Win2003.  

But I noticed that there are some extra steps in Win2003 as follows, and after this nothing happens.

      
6:07:58 PM      svchost.exe:788      QUERY INFORMATION      C:\Program Files\KIDASA\Milestones Professional 2006\System\Miles.exe      SUCCESS      Attributes: A      
6:08:34 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Options: OpenIf  Access: 00120196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50008      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50008      
6:08:34 PM      svchost.exe:912      WRITE       C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Offset: 50008 Length: 94      
6:08:34 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS            
6:08:34 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Options: OpenIf  Access: 00120196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50102      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50102      
6:08:34 PM      svchost.exe:912      WRITE       C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Offset: 50102 Length: 94      
6:08:34 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS            
6:08:34 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Options: OpenIf  Access: 00120196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50196      
6:08:34 PM      svchost.exe:912      WRITE       C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Offset: 50196 Length: 94      
6:08:34 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS            
6:08:34 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Options: OpenIf  Access: 00120196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50290      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50290      
6:08:34 PM      svchost.exe:912      WRITE       C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Offset: 50290 Length: 94      
6:08:34 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS            
6:08:34 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Options: OpenIf  Access: 00120196      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50384      
6:08:34 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Length: 50384      
6:08:34 PM      svchost.exe:912      WRITE       C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS      Offset: 50384 Length: 94      
6:08:34 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\WBEM\Logs\wbemcore.log      SUCCESS            
6:09:02 PM      svchost.exe:912      READ      C:\WINDOWS\system32\wbem\Repository\FS\OBJECTS.DATA      SUCCESS      Offset: 3153920 Length: 8192      
6:09:02 PM      svchost.exe:912      READ      C:\WINDOWS\system32\wbem\Repository\FS\OBJECTS.DATA      SUCCESS      Offset: 3096576 Length: 8192      
6:09:02 PM      svchost.exe:912      READ      C:\WINDOWS\system32\wbem\Repository\FS\OBJECTS.DATA      SUCCESS      Offset: 5324800 Length: 8192      
6:09:02 PM      svchost.exe:912      READ      C:\WINDOWS\system32\wbem\Repository\FS\OBJECTS.DATA      SUCCESS      Offset: 5545984 Length: 8192      
6:09:02 PM      svchost.exe:912      READ      C:\WINDOWS\system32\wbem\Repository\FS\OBJECTS.DATA      SUCCESS      Offset: 11427840 Length: 8192      
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\      NOT FOUND      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      OPEN      C:\WINDOWS\system32\Ras\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\WINDOWS\system32\Ras\      NO SUCH FILE      FileBothDirectoryInformation: *.pbk      
6:09:02 PM      svchost.exe:912      CLOSE      C:\WINDOWS\system32\Ras\      SUCCESS            
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\TEMP      SUCCESS      Attributes: D      
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\WINDOWS\TEMP      SUCCESS      Attributes: D      
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\autoexec.bat      SUCCESS      Attributes: A      
6:09:02 PM      svchost.exe:912      OPEN      C:\autoexec.bat      SUCCESS      Options: Open  Access: Read      
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\autoexec.bat      SUCCESS      Length: 0      
6:09:02 PM      svchost.exe:912      READ       C:\autoexec.bat      SUCCESS      Offset: 0 Length: 0      
6:09:02 PM      svchost.exe:912      CLOSE      C:\autoexec.bat      SUCCESS            
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\Documents and Settings\Administrator.DDEIDC01\Local Settings\Temp      SUCCESS      Attributes: D      
6:09:02 PM      svchost.exe:912      OPEN      C:\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\      SUCCESS      FileBothDirectoryInformation: Documents and Settings      
6:09:02 PM      svchost.exe:912      CLOSE      C:\      SUCCESS            
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\Documents and Settings\      SUCCESS      FileBothDirectoryInformation: Administrator.DDEIDC01      
6:09:02 PM      svchost.exe:912      CLOSE      C:\Documents and Settings\      SUCCESS            
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS      FileBothDirectoryInformation: Local Settings      
6:09:02 PM      svchost.exe:912      CLOSE      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS            
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\Documents and Settings\Administrator.DDEIDC01\Local Settings\Temp      SUCCESS      Attributes: D      
6:09:02 PM      svchost.exe:912      OPEN      C:\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\      SUCCESS      FileBothDirectoryInformation: Documents and Settings      
6:09:02 PM      svchost.exe:912      CLOSE      C:\      SUCCESS            
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\Documents and Settings\      SUCCESS      FileBothDirectoryInformation: Administrator.DDEIDC01      
6:09:02 PM      svchost.exe:912      CLOSE      C:\Documents and Settings\      SUCCESS            
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS      Options: Open Directory  Access: 00100001      
6:09:02 PM      svchost.exe:912      DIRECTORY      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS      FileBothDirectoryInformation: Local Settings      
6:09:02 PM      svchost.exe:912      CLOSE      C:\Documents and Settings\Administrator.DDEIDC01\      SUCCESS            
6:09:02 PM      svchost.exe:912      QUERY INFORMATION      C:\Documents and Settings\Administrator.DDEIDC01\Application Data      SUCCESS      Attributes: DRH      
6:09:02 PM      svchost.exe:912      OPEN      C:\Documents and Settings\Administrator.DDEIDC01\Application Data\Microsoft\Network\Connections\Pbk\      PATH NOT FOUND      Options: Open Directory  Access: 00100001      
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddei

ASKER

To active_agent:
   I have already configured the DCOM config, and gave Launch/Activate permissions to both IUSR_computer_name and NETWORK SERVICE accounts. Also verified that under Web Server Extensions, ASP.NET is allowed.
Avatar of ddei

ASKER

I created a VBS script and tried to run as administrator;  it did not work in Windows 2003, but worked fine in Windows XP.

Code:
------
Dim oMiles
Dim ImageName
Dim FullPathImageName
Dim WWWPathImageName
Dim szTaskName
Dim szStartDate
Dim szEndDate
Dim szDuration
Dim schStartDate
Dim schEndDate
Dim RowNumber
                                                               
' Create the Milestones object using a file on the web server
Set oMiles = GetObject("c:\\Inetpub\\wwwroot\\WebChart\worknew\\Gantt Chart for Milestones.mla")
'Activate Milestones
oMiles.Activate()
oMiles.Refresh()
Avatar of ddei

ASKER

I registered the application Miles.exe and now the VBS script works, but not the aspx page. Now it displays the error message, " Can't create the Activex component".   I once again verified the DCOM config permissions, and they are correct.
Do you see anything about permission errors in FileMon now?
Just out of curiousity i did some research on this issue.

1. Just wanted to know that when you installed Miles.exe on the win2k3 server, did you selected "Just This User" option , if yes than the registry entry (basically CLSId) for the miles application is only registered under current user registry key. ASP.NET runs under Network Service so there are chances that this error can come.


2. I'm sure that it is a permission issue. So try adding  "Network Service" to the Distributed COM and IIS Workgroup security groups. And then add Distributed COM to the Component Services
security areas with enable permissions. Restart the server and try it again.

I hope this will help.
Avatar of ddei

ASKER

Thank you for all your comments and solutions. I had to add  <identity impersonate="true'>  tag to the web.config file of the application to make the automation work.  Also, I had to give permissions to the IUSR_ComputerName account to the necessary folders.  And finally it started to work. Thanks again for your help.