[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

aspx page does not load in Windows 2003/IIS

Posted on 2007-07-26
14
Medium Priority
?
456 Views
Last Modified: 2008-01-09
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>
0
Comment
Question by:ddei
  • 7
  • 5
  • 2
14 Comments
 
LVL 22

Expert Comment

by:DarkoLord
ID: 19579227
Hi, do other ASP.NET pages load fine on this server?
0
 

Author Comment

by:ddei
ID: 19579235
Yes, All other ASP.NET pages of the reporting web application load correctly on this server.
0
 
LVL 22

Assisted Solution

by:DarkoLord
DarkoLord earned 1400 total points
ID: 19579271
How long did you wait for the page to load? Do you get a timeout (and possibly a line on which it occured?) if you wait long enough?

This GetObject does indeed look suspicious... Try commenting out everything regarding the "oMiles" object and see if page outpust anything...

You can check if there is a permission error by using a tool such as FileMon (http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx) and watch what happens when it tries to access that .mla file.
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 

Author Comment

by:ddei
ID: 19579386
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      
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 19579455
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?
0
 

Author Comment

by:ddei
ID: 19579575
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      
0
 
LVL 22

Accepted Solution

by:
DarkoLord earned 1400 total points
ID: 19579655
So, Miles.exe is an installed application that should be executed when the object created with GetObject is activated?

Do you have any sample applications with "Milestones Professional" to test if it is working (if all necessary libraries are registered)? Try creating a VBS script with the same lines to create the oMiles object and execute it locally as an administrator to see if it's working.
0
 
LVL 2

Assisted Solution

by:active_agent
active_agent earned 600 total points
ID: 19581505
If you are using Windows Server 2003 R2 (which has more restrictive default security) you may need to enter the Component Services screen (Start | Programs | Administrative Tools | Component Services | My Computer | DCOM Config | Milestones Professional Schedule | Properties. In the Properties box under Launch and Activation, select Customize, and add the local machines Internet Guest Account, which is usually "IUSR_computer_name" or Network Service (try both) and gave it Local Launch and Local Activation privileges. Also double check that in the Web Server (Start | Run | Type inetmgr) under Web Server Extensions, ASP.NET is allowed, by default it is prohibited.
0
 

Author Comment

by:ddei
ID: 19582318
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.
0
 

Author Comment

by:ddei
ID: 19582719
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()
0
 

Author Comment

by:ddei
ID: 19582923
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.
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 19583081
Do you see anything about permission errors in FileMon now?
0
 
LVL 2

Expert Comment

by:active_agent
ID: 19583219
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.
0
 

Author Comment

by:ddei
ID: 19595516
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.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question