CruiseControl.Net on Windows Server 2003 x64 - cruisecontrol.net

I'm having an issue with CruiseControl.net where the web dashboard just won't work in IIS. I have tried switching ASP.Net between 64 and 32 bit modes and reinstalling cruise control, but nothing seems to work. Has anyone else had issues with CruiseControl.Net on 64 bit platforms?
Cheers,
Jamie
[Edit]
Thought I should clarify, I am getting a 404 error when I try access the website. I am using the correct address because it asks for authentication. The .aspx handler is working because I don't see the default.aspx page from the ccnet directory.
[Edit2]
I am using the default web.config that comes with ccnet, but here it is:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!-- Change this if (for example) you want to keep your dashboard config file under source control -->
<add key="DashboardConfigLocation" value="dashboard.config" />
</appSettings>
<system.web>
<httpHandlers>
<!-- Yes, we are overriding .aspx - don't delete this! We are using .aspx since we know it is already bound to ASP.NET. In future we might use a
different extension so that people can add their own ASP.NET pages if they want to, but we should make sure in that case to change how
URLs are created -->
<add verb="*" path="*.aspx" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard"/>
<add verb="*" path="*.xml" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard"/>
</httpHandlers>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace
enabled="false"
requestLimit="10"
pageOutput="true"
traceMode="SortByTime"
localOnly="true"
/>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>

It seems I needed to enable Web Service Extensions for ASP.Net. I'm still not getting an ASP.Net tab in the cruise control website properties, but it is working.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727> or C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727> for 64 bit
Type aspnet_regiis.exe – i
ASP.NET will register itself and show up in Web Service Extensions

Clarify a bit, does the web-dashboard function incorrectly? Does it not show up at all?
The webdashboard uses Nvelocity, not ASP.NET WebForms, so you have to register a custom HTTPHandler in the Web.config for it to work.
<add verb="*" path="*.aspx" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard"/>
Post up your web.config.

Since you just want to know whether it works... it does.
I'm running it on a 64-bit Windows Server 2008 without a problem.
So now we've established it works, perhaps you can describe your issue in more detail?

Could not comment, I wanted to add this to the aswer to Adam:
I had to use this command in CMD for Win2008 x64
"C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe" -s "W3SVC/1/ROOT/ccnet"

Related

Turn Glimpse off completely

I am interested in being able to turn Glimpse off completely in the lightest weight way that I can manage. Between the glimpse documentat and the response to this question How to disable Glimpse, the difference between turning Glimpse.axd off and defaultRuntimePolicy="Off" the strongest "off" functionality I can see is setting the defaultRuntimePolicy to off in the web.config file.
However, this still loads a number of glimpse assemblies into my process as shown in the debugger - the answer to this question Why is Glimpse still running? sheds some light on why.
So what I've been doing is keeping around a GlimpseOff shelveset that comments out the glimpse configuration in my web.config file and also comments out the references in my .csproj file. And applying it when I really need glimpse turned off. This works, and I'm pretty sure it really does turn everything off fully, but it is pretty cumbersome.
The alternatives I've considered are (a) removing the glimpse nuget pacakges when I need to turn it off, which is even more cumbersome than my current solution or (b) creating a new build configuration in visual studio which doesn't include the glimpse modules and preforms a web.config transform to remove the configuration.
Neither of these seem optimal. Anyone have a better/cleaner/easier way to do this?
You could use an XML transform to remove the Glimpse entries in Release mode/production.
Adding these entries to web.release.config:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<configSections>
<section name="glimpse" xdt:Transform="Remove" />
</configSections>
<glimpse xdt:Transform="Remove"/>
<system.web>
<httpModules>
<add name="Glimpse" xdt:Transform="Remove"/>
</httpModules>
<httpHandlers>
<add path="glimpse.axd" xdt:Transform="Remove" />
</httpHandlers>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="Glimpse" xdt:Transform="Remove" />
</modules>
<handlers>
<add name="Glimpse" xdt:Transform="Remove" />
</handlers>
</system.webServer>
</configuration>
If you'd like, you can input this transform and your web.config into the Web Config Transform Tester to make sure it works for your app.

web.config causing problems with iis

Up until now I have only worked with this web.config within Visual Studio. However I am now trying to publish my website to IIS and there are errors associated with my web.config. It seems that it crashes on configuration data for a module.
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<phpNet>
<classLibrary>
<add assembly="php_mcrypt.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="mcrypt" />
<add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" />
</classLibrary>
<scriptLibrary/>
</phpNet>
</configuration>
error:
This screenshot is when trying to double click on any "Feature" within the "Feature View" of IIS. However if i just hit the website via a browser the error is the same:
The configuration section 'phpNet' cannot be read because it is
missing a section declaration
phpNet is for Phalanger, and the extension should be installed but I do not know how to check that. Like I said though, this web.config and phalanger worked fine within visual studio so Im not sure whats wrong. Especially since the installer did install the samples in iis.
You are missing configuration section definition
<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
Without this, .NET does not know the 'phpNet' configuration section.
Also this means, you don't have Phalanger installed using setup.exe. Here are some information about using Phalanger without proper installation (important is the part about configuration) http://www.php-compiler.net/blog/2011/installation-free-phalanger-web
I found this posting http://crdevelopment.net/2012/06/12/fixing-iis-error-the-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration/
which led me to check the application pools.
At which point I noticed there where multiples. I selected the phalangerAppPool and that got rid of my error, but brought about a new one.
Handler “PageHandlerFactory-Integrated” has a bad module
“ManagedPipelineHandler” in its module list
However that error was alot easier to resolve (fix)

iis 7 + http custom handler error: could not load file or assembly The system cannot find the file specified

Windows vista 32 bit - C# - .NET 4 - sqlite - IIS 7
I'm building a small project that contains is a custom HTTP handler where an user can request a XML file and the project will generate the file and send it to the user. It should be flexible enough to send something else too like e.g. json.
Everything was going well until I had to deploy the handler. I've created a library (dll) file which contains the logic for serving of the requested information. I've open IIS manager and I've created a virtual directory to the debug bin file (later on i made it an application. it did not make a difference).
I've followed countless examples and tutorials like these ones:
I started with this one: http://support.microsoft.com/kb/308001
http://msdn.microsoft.com/en-us/library/bb515343.aspx
msdn.microsoft.com/en-us/library/46c5ddfy.aspx
But with no luck. As you could have read I'm not using any asp.net website even though I do have a web.config that I've added to the bin folder and it looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<directoryBrowse enabled="false" />
<handlers accessPolicy="Read, Script, Execute">
<add name="LigoManagedHandler" path="*" verb="*" type="Ligo.Service, Ligo" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
</configuration>
When I try to run handler in the browser get the following error:
Could not load file or assembly 'Ligo' or one of its dependencies. The system cannot find the file specified.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Ligo' or one of its dependencies. The system cannot find the file specified.
I have tried so many possible combination in IIS manager to get it working ('httphandlers', 'classic mode' and so on ...) but i'm truly stuck. The information I've found on the internet is not helping much.
What am I doing wrong or missing to make it work?
Something in this rant triggered an idea, an I stumbled on the answer.
The line in all those tutorials that say put type="ClassName, AssemblyName" into the Handlers section in Web.Config are plain WRONG.
All I did was change this to type="AssemblyName.ClassName" and everything started working, in both a Web Site Project and a Web Application Project that I had created.
I'm running IIS 7.5 in integrated mode so YMMV.
Craig
I figure it out. I had to make a asp.net website project and add my dll as reference to this project.
I read this thread that provided this information which is not clear on the internet.
http://forums.asp.net/t/1088861.aspx/1?What+causes+the+quot+Could+not+load+type+quot+problem+
It should state that it is not possible to make the httphandler without a aspnet website project. or am i mistaken? the example on the internet are incorrect! or provide too little information.
I know, this is an old thread. However, I've been looking for an answer for a few days without finding a clear one. So, in case anyone comes across similar scenario.
You can create custom Http Handler as a stand-alone Class Library project and use it in IIS.
On IIS Add new Application with ASP4 Integrated mode. Place your compiled DLL into bin folder (this is what i was missing all along). Seems obvious that it should be there; took some time to figure this out. :)
web.config:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<handlers>
<add verb="*" path="*.ogg" name="test" type="Namespace.Classname"/>
</handlers>
</system.webServer>
</configuration>
Hope this helps.
Cheers.

asp Default document not working on IIS7

I have a classic asp application inside a .NET 4.0 application. I have set the default document to login.asp, but it does not automatically redirect to it. The entire application functions fine though and even displays the login.asp correctly if I browse to it.
The default document section in web.config is as below:
<defaultDocument>
<files>
<clear />
<add value="login.asp" />
<add value="index.html" />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="iisstart.htm" />
</files>
</defaultDocument>
I have looked at other similar questions on this site but were not of much help.
I finally found the issue was because the asp application was assigned to an app pool in classic mode using .NET Framework 4.0.
Once I changed the app pool to use .NET Framework 2.0 (with managed pipeline in classic mode), the default document started to work too!
Make sure you have Read/Write Feature Delegation enabled for Default Document:
DefaultDocument does not redirect to the file (i.e. URL is not changed). It acts similar to Server.Transfer function — executes the file when root URL (http://sitename/) is requested. Probably, your login.asp executed but it has instructions to redirect logged-in users to a different page, or display the different content to them.
Make sure the response is not cached. Clear cache and cookies and try again.
I had this problem today with a brand new asp.net site deployed to Azure. I tried messing with IIS and my web.config included
<defaultDocument enabled="true">
<files>
<clear />
<add value="Index.html" />
</files>
</defaultDocument>
Turns out my problem was that the File > New Project wizard uses .NET 4.5.2 by default, and that isn't fully supported yet in Azure. I recompiled using .NET 4.5 as the target and everything works now!

ASP.NET Web App using the wrong (2.0) CLR version (instead of 4.0)

I just deployed an asp.net web app I have been working on to a new dev machine. It's a 4.0 project converted from 3.5. For some reason, I get the following error when I try to hit the site via my IIS website under the Default Website:
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
It lists this as being a config error on the ASP.NET error page:
<compilation debug="true" targetFramework="4.0"/>
However, I notice that at the bottom of the error page, the version information indicates that it is using version 2 instead of version 4. Anyone have ideas about how to fix this?
I have made sure that my default website usese a .net 4 / integrated app pool and i cycled iis after this change was made. Still not luck. Here is my entire web.config file:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="EventMasterConnectionString" connectionString="Data Source=localhost;Initial Catalog=BashBidder;Integrated Security=True" providerName="System.Data.SqlClient"/>
</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.
-->
<compilation debug="true" targetFramework="4.0">
</compilation>
<!--
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>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
</configuration>
Thanks for the help!
You have to configure your application pool so it uses version 4.0 of the framework.
This procedure explains how to do it on IIS 7, and that one on IIS 6.

Resources