Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

problems distributing ultidev cassini with asp.net application
max brown
#1 Posted : Sunday, January 20, 2008 6:53:12 AM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

Hi,
I have written a small asp.net app which needs to run on client machines that do not have iis installed. I have installed ultidev cassini on my development machine and it runs the app just fine.

Then I followed your directions on creating a web installer project and included ultidev cassini there.

After building the app and then trying to install on my test machine. It looks like the instal went ok. Files are in the folder I want them in. Ultidev Cassini is on the machine. The problem is I receive error 'Firefox can't establish a connection to the server at localhost:7756" when I try to run the localstart.htm file which was created like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<meta http-equiv="refresh"
content="0;url=http://localhost:7756/GoToApplication.aspx?AppID=C6F9195F-912D-43DC-9AFD-A5A33548671D"/>
</head>
<body>
</body>
</html>

Looking at this now - I'm wondering if I should be hardcoding the localhost:7756

Shouldn't ultidev cassini be assigning that value when it runs?

Thanks for any help you can give.

P.S. my web.config file is in the targetdir and is as follows:

<?xml version="1.0"?><configuration>

<appSettings/>
<!--<connectionStrings/>
-->
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
</httpHandlers>
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
Ultidev Team
#2 Posted : Sunday, January 20, 2008 8:46:59 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Max,

Thank you for the very complete error submission. It looks like UltiDev Cassini service has not started on the test machine for some reason. To check whether that's the case please go to Start -> Control Panel -> Administrative Tools -> Services, and check if "UltiDev Cassini Web Server for ASP.NET 2.0" service is in the "Started" state. Then, please go to Start -> Control Panel -> Administrative Tools -> Event Viewer and check Application bin for error and warning entries. Please let us know if the service was in the Started state and whether you have found any errors.

Another possibility - although we saw it only with very slow machines, is if Cassini Explorer - the application running on port 7756, either failed, or simply didn't have enough time to get completely loaded when you tried to launch your application.

Both of the issues mentioned above could be worked around with a simple PC reboot, but if you suspect a chronic problem rather than a one-time glitch, please uninstall your application and UltiDev Components from the test machine, and try installing your application again.

In any case, please keep us posted - our main goal here is to help application developers using our little web server, and we'll do our best to figure out what's going on.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
max brown
#3 Posted : Sunday, January 20, 2008 10:08:22 AM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

You are right. It looks like the Cassini service did not start. When I checked AdministrativeTools/Services - UltiDev Cassinis Web Server for ASP.NET 2.0 service was there but was not started - there was nothing for the state, just a blank.

I copied the event log for you

Information
Date: 1/20/2008
Time: 7:58:53 AM
Source: UltiDev Cassini 2.0 Service
Description: Successfully started Cassini web application [1928, "BE & Associates"].

Information
Date: 1/20/2008
Time: 7:58:56 AM
Source: MsiInstaller
Description: Product: UltiDev Cassini Web Server for ASP.NET 2.0 -- Installation completed successfully.

Information
Date: 1/20/2008
Time: 7:58:53 AM
Source: UltiDev Cassini Service
Description: Service started successfully.


Warning
Information
Date: 1/20/2008
Time: 7:59:01 AM
Source: ASP.NET 2.0.50727.0
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 1/20/2008 7:59:00 AM
Event time (UTC): 1/20/2008 3:59:00 PM
Event ID: f7968b6594a04b7b8bf154ced386b7c3
Event sequence: 4
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: 14b3e063-1-128453183335000080
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\BE & Associates\
Machine name: HARMONY

Process information:
Process ID: 3716
Process name: UltiDevCassinWebServer2a.exe
Account name: NT AUTHORITY\SYSTEM

Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\BE & Associates\web.config line 24)

Request information:
Request URL: http://127.0.0.1:1928/Home.aspx
Request path: /Home.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM

Thread information:
Thread ID: 4
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

max brown
#4 Posted : Sunday, January 20, 2008 2:17:54 PM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

One more thing. I tried installing to another machine running windows xp. The installer said I needed to install .net framework 2.0 so I did that and then tried the asp.net installer again. This time I received this fatal error: "Failed to register an application with Cassini while converting AppID paramter to GUID. GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx)"
and it ran the uninstall.

Do I need to run the cassini installer before I try to install asp.net apps? This machine did not have cassini running but there was no message. Can I do the install via the setup without making the end user run two installers? I'm just trying to set something up for end users who are not particularly computer savvy.

Thanks for your help
Ultidev Team
#5 Posted : Sunday, January 20, 2008 4:23:59 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Max, it looks like we are dealing with two separate issues.

First, from the event log you have provided it is clear that service has started after all, but if you not found it in the Started state, then what most likely has happened is the application crashed hard when it was being compiled, taking the whole hosting process - UltiDev Cassini service - with it. From the log it looks like the system was looking for the Microsoft.ReportViewer.WebForms assembly and it could not find it. That assembly should be either in the Bin folder of your application, or in the GAC. Normally, you want to add MS Report Viewer as a Prerequisite to your installation - just like you did with UltiDev Cassini. That will ensure that MS Report Viewer is installed correctly on the client's server and registered with the GAC. To check whether MS Report Viewer was successfully installed on the destination machine, go to Start -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration, then expand My Computer folder on the left and select "Assembly Cache". After that check whether Microsoft.ReportViewer.WebForms is among the GAC components.

Second problem is harder to understand given you have not changed the installation's custom steps' arguments between you tried to install the first time and the second time. We would expect this problem causing all installation attempts to fail right where you have reported. Please double-check your setup project's Install custom step arguments to make sure your application id argument has format of /AppID="{61526CD1-BBBE-4511-902D-EFE4A1E2845F}", and that there is a white space between the GUID value and the next parameter, like /AppLocation.

Also, if your setup project has .NET Framework 2.0 listed as a Prerequisite, then the entire installation process, with .NET Framework 2.0, Report Viewer and UltiDev Cassini, should be one a continuous process not requiring you to go out and download & install the framework separately. And to answer your question, UltiDev Cassini should be installed only after .NET Framework 2.0 was installed (it still can be the same installation if both UltiDev Cassini and .NET Framework are prerequisites for your application).

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
max brown
#6 Posted : Monday, January 21, 2008 6:57:20 PM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

OK, I added Microsoft.ReportViewer.Winforms.dll to the bin directory of the application folder and to the install section of custom actions.

and yes, I did create a second problem yesterday. I took out all whitespace in the custom steps arguments which caused the error on the second install. Now it is out and the install works.

But I am still not seeing my pages. I am still receiving the error 'Firefox can't establish a connection to the server at localhost:7756" and I also get a windows error: "Windows cannot find 'c:\Program Files\BE\LocalStart.htm'. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click search."

I can navigate to the install folder and double click localstart.htm and receive the same errors.

What should I try next?
Ultidev Team
#7 Posted : Monday, January 21, 2008 7:36:18 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Max, could you please clean up Windows Event Log, then run installation again, refresh the Event Log and see whether you get any error entries? Whenever you get "no connection" error, it most likely means that UltiDev Cassini service process has crashed - either on its own, or aided by a faltering application. Event Log should tell what's going on.

Regarding 'c:\Program Files\BE\LocalStart.htm' not being found, what happens if you do Start -> Run after installation and then paste c:\Program Files\BE\LocalStart.htm in and run it. Do you also get the "not found" error? Also, if you paste c:\Program Files\BE in the Start -> Run, does it open up Explorer with that folder, and if so, is LocalStart.htm file there?

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
max brown
#8 Posted : Tuesday, January 22, 2008 4:23:57 AM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

I think I must be having trouble getting assemblies installed. I went to new machine and ran the installer. I received the 'no connection' error and the 'not found' error.

Services did not show cassini at all. Assembly Cache for .net framework 2.0 did not show microsoft.reportviewer.winforms.dll.

Maybe I do not have my setup package working correctly. Do I actually have to run the cassini setup that is generated by the installer like you have to run the dotnetfx.exe if you do not have .netframework 2.0 installed? The only thing I am running is the installer.msi.

I do not see any errors in the event log.
Ultidev Team
#9 Posted : Tuesday, January 22, 2008 4:48:29 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Max,

in order to install prerequisites, you need to run Setup.exe. Running the MSI itself will not be sufficient. MSI API does not allow to run one MSI-based installation from another. Because of that, if an installation includes multiple MSI packages, some other, non-MSI process, has to execute MSIs one after another. MS has come up with the notion of the "bootstrapper" - the Setup.exe that has manifest telling Setup.exe which MSIs to run and where they are located. When you check Prerequisite items in the Setup project's Prerequisites list, you tell Visual Studio to generate appropriate manifest for the Setup.exe.

You don't need to run Setup.exe only if all prerequisites are already installed on the target machine. Then it's OK to run MSI only. Also, please note that on Vista you want to run Setup.exe instead of just MSI even if all prerequisites are installed. The reason for that is on Vista double-clicking MSI file will cause installation process to run in restricted mode - with far fewer access rights than if you run Setup.exe. On XP it's not an issue - you can run either MSI or Setup.exe, given all prereqs are already installed.

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
max brown
#10 Posted : Tuesday, January 22, 2008 4:57:46 PM(UTC)
Groups: Member
Joined: 1/20/2008(UTC)
Posts: 6

Good News - I think I finally have the installer working correctly. Running the setup.exe did the job - thanks.

But I seem to have another issue. In my application I have a master page (master1.master) which will run whichever aspx page that is specified. The default page is Home.aspx

So the page I specify the app to run when it is started is home.aspx

When I try to run the app after installation, whether from start/programs or by double clicking localstart.htm the web will open but the page has the following error:

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'HRDirector.Master1'.

Source Error:

Line 1: <%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Master1.Master.vb" Inherits="HRDirector.Master1" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File: /Master1.master Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832



In the event viewer I also found this error:
Date: 1/22/08
Time 6:43:06 PM
Description:Event code: 3006
Event message: A parser error has occurred.
Event time: 1/22/2008 6:45:06 PM
Event time (UTC): 1/23/2008 2:45:06 AM
Event ID: 6e23be5e350b40c2870108f68c934c4c
Event sequence: 4
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: 14b3e063-2-128455299041562500
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\Bent Ericksen & Associates\
Machine name: STEPHY

Process information:
Process ID: 1792
Process name: UltiDevCassinWebServer2a.exe
Account name: NT AUTHORITY\SYSTEM

Exception information:
Exception type: Exception
Exception message: Could not load type 'HRDirector.Master1'.

Request information:
Request URL: http://127.0.0.1:2140/Home.aspx
Request path: /Home.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM

Thread information:
Thread ID: 8
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.PageParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)


Can you tell what I need to do now?
THanks for all your help
Ultidev Team
#11 Posted : Tuesday, January 22, 2008 5:48:45 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Max,

We can't tell from the information you provided what's wrong. If you would like, you could contact us via email, so we could give you our email address where you could send your application installation package. We then would install it and possibly tell what's going on.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
mooseman
#12 Posted : Wednesday, February 25, 2009 6:15:05 AM(UTC)
Groups: Member
Joined: 2/25/2009(UTC)
Posts: 3

Was this ever resolved? I am getting the same "Firefox can't establish a connection to the server at localhost:7756" error.
Ultidev Team
#13 Posted : Wednesday, February 25, 2009 6:57:55 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there.

Please check Windows Event Viewer to see whether there were error entries around the time UltiDev Cassini components were installed. Let us know what you have found and we'll happy to assist you with troubleshooting.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
mooseman
#14 Posted : Wednesday, February 25, 2009 7:40:55 AM(UTC)
Groups: Member
Joined: 2/25/2009(UTC)
Posts: 3

The closest error happen an hour and a half after install.
Ultidev Team
#15 Posted : Wednesday, February 25, 2009 7:53:08 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there.

Could you please copy and paste any error/warning entries related to UltiDev Cassini and MsiInstaller? If you wish, you can send us your event log file for analysis. For that please contact us via email and we'll respond with our address.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (17)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.