I want to write a Managed Module for IIS 7.5 using .NET 4.0 because I want to use the new MemoryMappedFile class.
I started with a small prototype compiled with .NET 4.0 and tried to integrate it into the IIS without success.
The module is strong-named and I could install it into the GAC. After that I added it through the IIS Manager but the worker process doesn't seem to load it as I cannot debug the module by attaching the debugger to w3wp.exe. The AppPool also runs with .NET 4.0.
Any ideas about that?
Thanks,
Simon
I solved it. I had to uncheck the "Invoke only for requests to ASP.NET applications or managed handlers" checkbox. After that the module worked as expected.
Related
When I use a Visual Studio 2015 template to create a brand-new ASP.NET Core project, I see a couple of unexpected pieces. I'd like to understand these:
By default, the new project targets dnxcore50 and dnx451. I thought ASP.NET 5 / MVC 6 required .net 4.6, so I don't know why dnx451 is one of the default targets.
Regardless of dnx target, the startup.cs file specifies app.UseIISPlatformHandler. I've been running the dnxcore50 target in Docker (i.e. Linux) without any problem, even though Linux does not have IIS. So I don't know what UseIISPlatformHandler does. I can find no documentation for it either.
Can anyone clarify?
Why dnx451 instead of dnx46 is basically IIS's fault, see answer here. Also perhaps the templates run behind because Azure has not yet switched to 4.6? Just a little theory of mine. I'm not sure.
UseIISPatformHandler is again only used for IIS. You can savely remove it if you have no interest in publishing your web app to IIS. You can learn more about the HTTP Platform Handler (which IIS needs) here. And you can learn more about the IIS Platform Handler Middleware from the source code.
Does this make it more clear?
I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. Problem is I can't get it to run on the server...
.NET 4.0 framework is installed. I've run aspnet_regiis and deployed the website. I gave it it's own application pool. But I'm getting the following error:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible.
So any ideas what I need to do in order for this to work?
EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5...
.Net 4.5 cannot be installed on Windows Server 2003.
Instead, you should use MVC 4.0 on .Net 4.0, which will work fine.
I just installed dnn 6.2 fresh as a .net 3.5 application on windows 7 under iis 7.5 using the default app pool. I then go and change the default app pool to .net 4.0, load up my site, and get an iis 7.5 error - IIS 7.5 Detailed Error - 500.21:
...
...
Most likely causes:
Managed handler is used; however, ASP.NET is not installed or is not installed completely.
There is a typographical error in the configuration for the handler module list.
Things you can try:
Install ASP.NET if you are using managed handler.
Ensure that the handler module's name is specified correctly. Module names are case-sensitive and use the format modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule".
Everything I've read on this says to only perform two steps:
change the app pool to run under .net 4.0 (restart app pool)
pull up your site and dnn will make the necessary changes to the web.config file
Note: the default app pool has modify permissions on my website folder and all sub folders/files.
How can I fix this error and get dnn to run under asp.net 4.0?
Thanks for any help!
This happens to me quite a bit when setting up a new machine. You need to register ASP .NET 4.0 with IIS you do that by using
aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
So go to your .net 4 directory from your command line, path will be something like this.
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
then in that directory run
aspnet_regiis.exe -ir
That will re-register 4.0 with IIS and you should be all set.
Hi I have an application which has a main project set to ver 3.5 with some utility projects set to ver 2.0. I need to migrate the app to work on IIS7.5. I have tried recompiling the app as is and putting it on the server but to no avail.
What do I need to do to get this app running on 7.5? Will I need to upgrade the projects in the solution to .net 4.0?
any pointers much appreciated.
No you don't necessary need to upgrade to .NET 4.0 even if it could be nice :-) All you need is to make sure the application pool is set to use CLR 2.0 in IIS and it will run just fine (obviously .NET 3.5 needs to be installed on the server).
I'd like to use ELMAH in an ASP.NET MVC 2 application running on .NET 4, but according to the project hosting site on Google code, it only supports .NET 1.1 and 2.0.
Is there a .NET 4 version of ELMAH already, or do I have to download the source and update whatever breaks myself?
Elmah works perfectly fine for ASP.NET 4.0.
However, there are a few tricks in getting it setup to work perfectly on an MVC website.
I have recently starting blogging about this topic so be sure to check out my blog series on logging in MVC. The first article covers getting Elmah set up and running for MVC using all the tricks that you can find about it on StackOverflow.
There is a link to downloadable code at the end of the article. Hope that helps.
http://dotnetdarren.wordpress.com/
I am using .NET 4.0 and I dont about a new version.... but I am using the elmah 1.1 and it works....:)..You may have to change source though to add custom fields or log additional values..which is bit of a pain...but get started here
Well it's open source nothing should prevent you from recompiling it using the .NET 4.0 framework.
This link has some information about running pre .NET4 web apps and .NET4 web apps in a server.
EDIT:
Actually you won't need to recompile ELMAH. According to this and this article the In-Process side by side execution should do the trick.
I had the same question so I downloaded the 1.1 src, opened it up in visual studio 2010, changed the project to target 4.0 and rebuilt it. I then dropped the dll in my ASP.NET MVC 2.0 app and it has worked fine.