mod-aspdotnet-users Mailing List for mod_aspdotnet
Brought to you by:
wrowe
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(3) |
May
(3) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(3) |
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(6) |
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert E. <rob...@ne...> - 2012-04-09 15:24:27
|
Hi there, Thanks for that but unfortunately it didnt solve the prb. Below is the current complete aspnet conf I am using #asp.net LoadModule aspdotnet_module "modules/mod_aspdotnet.so" AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo <IfModule mod_aspdotnet.cpp> # Mount the ASP.NET /asp application AspNetMount /MMM1053/files "c:/inetpub/wwwroot/MMM1053/files" AspNetMount /MMM1053 "c:/inetpub/wwwroot/MMM1053" AspNetMount /MMMMobile "c:/inetpub/wwwroot/MMMMobile" # Map all requests for /asp to the application files Alias /MMM1053/files "c:/inetpub/wwwroot/MMM1053/files" Alias /MMM1053 "c:/inetpub/wwwroot/MMM1053" Alias /MMMMobile "c:/inetpub/wwwroot/MMMMobile" <Directory "c:/inetpub/wwwroot/MMM1053"> AspNet Files Virtual Order allow,deny Allow from all DirectoryIndex index.htm index.aspx Default.htm Default.aspx #default the index page to .htm and .aspx </Directory> <Directory "c:/inetpub/wwwroot/MMMMobile"> AspNet Files Virtual Order allow,deny Allow from all DirectoryIndex index.htm index.aspx Default.htm Default.aspx #default the index page to .htm and .aspx </Directory> # For all virtual ASP.NET webs, we need the aspnet_client files # to serve the client-side helper scripts. AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> Options FollowSymlinks Order allow,deny Allow from all </Directory> # Doesnt work #<Directory "c:/inetpub/wwwroot/MMM1053/files"> #AspNet Files Virtual Dirs #</Directory> #Works for everything except getting the dir of app root <Location /MMM1053/files> AspNet Dirs Files Virtual SetHandler asp.net </Location> </IfModule> #asp.net On Mon, Apr 9, 2012 at 8:14 AM, Tobias Polley <ma...@to...> wrote: > Hi Rob, > > my guess is that you have to use > > <Directory C:/Inetpub/wwwroot/MM1053/files/> > AspNet Files Virtual Dirs > </Directory> > > or similar, as the "AspNet" instruction is per-directory: If you have > another AspNet instruction later in your configuration file (for the > same "directory"), it overrides all previous ones. > > http://httpd.apache.org/docs/2.0/mod/core.html#location says "Use > <Location> to apply directives to content that lives outside the > filesystem. For content that lives in the filesystem, use <Directory> > and <Files>." > > Best, Tobias > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Mod-aspdotnet-users mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users > |
From: Tobias P. <ma...@to...> - 2012-04-09 12:55:09
|
Hi Rob, my guess is that you have to use <Directory C:/Inetpub/wwwroot/MM1053/files/> AspNet Files Virtual Dirs </Directory> or similar, as the "AspNet" instruction is per-directory: If you have another AspNet instruction later in your configuration file (for the same "directory"), it overrides all previous ones. http://httpd.apache.org/docs/2.0/mod/core.html#location says "Use <Location> to apply directives to content that lives outside the filesystem. For content that lives in the filesystem, use <Directory> and <Files>." Best, Tobias |
From: Robert E. <rob...@ne...> - 2012-04-09 11:36:41
|
I have had this module running for the last couple of years with no problem, love it :) However I now have one situation that is giving me a problem. Ok so I have an asp folder mounted and accessed say as \MM1053, now I want to mount a subfolder \MM1053\files. I tried using the Directory directive as I had for MM1053 but it didnt work, what did work was the Location directive. Great so now the new app in the subfolder works perfectly. Except one small problem... One function in another application simply calls the root of this new app "\MM1053\Files" as part of a test just to make sure it is running. Unfortunately it fails with an error in the log [Mon Apr 09 07:13:01 2012] [error] [client 10.0.1.12] mod_aspdotnet: Forbidden, 'AspNet Dirs' is not enabled for: /MM1053/files/ (directory C:/Inetpub/wwwroot/MM1053/files/) My Location directive is this <Location /MM1053/files> SetHandler asp.net AspNet Files Virtual Dirs Order allow,deny Allow from all DirectoryIndex index.htm index.aspx Default.htm Default.aspx </Location> So I have the Dirs directive but it seems not to be effective. Any thoughts? TIA Rob |
From: Electronjockey <ele...@ho...> - 2011-07-19 14:47:12
|
Pete Also, if you haven't already try the following in your config: #AspNetVersion v2.0.50727 AspNetVersion v4.0.30319 This should work if you have the latest mod_aspdotnet (admittedly a few years old). -----Original Message----- From: Pete W <pet...@ho...> To : ele...@ho... Sent: Tue Jul 19 8:48:08 2011 Subject: mod_aspdotnet Hi, Sorry for this unsolicited email, feel free to ignore. I saw your posts in mod-aspdotnet-users and wondered if you've got any advice - I should really have posted there but wasn't sure if you still were still active in it. I've got a precompiled app working with .net 2, Apache 2.2.8 and mod_aspdotnet. But I can't get it to work after migrating the solution to .net 4 - is a rebuilt mod_aspdotnet or Apache_Web.dll required or can the problem be fixed by configuration? Cheers, Peter Wishart |
From: Electronjockey <ele...@ho...> - 2011-07-19 14:40:18
|
Peter, No worries. There are two distributions of the .Net Framework 4.0. Typically the "Microsoft .NET Framework 4.0 Client Profile" is installed. This does not include the System.Web and related assemblies that are required for asp.net. You need the Full release, which will show up in "Programs and Features" (along with the "Client Profile") as "Microsoft .NET Framework 4.0 Extended". The may be available as a separate download from the full, but I've only used the Full dist. Try that and let me know. Todd -----Original Message----- From: Pete W <pet...@ho...> To : ele...@ho... Sent: Tue Jul 19 8:48:08 2011 Subject: mod_aspdotnet Hi, Sorry for this unsolicited email, feel free to ignore. I saw your posts in mod-aspdotnet-users and wondered if you've got any advice - I should really have posted there but wasn't sure if you still were still active in it. I've got a precompiled app working with .net 2, Apache 2.2.8 and mod_aspdotnet. But I can't get it to work after migrating the solution to .net 4 - is a rebuilt mod_aspdotnet or Apache_Web.dll required or can the problem be fixed by configuration? Cheers, Peter Wishart |
From: William A. R. Jr. <wr...@ro...> - 2011-01-21 19:49:48
|
On 1/21/2011 10:07 AM, Electronjockey wrote: > from what I've been able to determine it looks like these bugs are > caused by an incorrect version of mscoree.dll present on the target system. Thanks, I'll review these, in fact I owe some cycles to some new builds. I've been hiding/busy with the next Apache httpd major release, but hope to find some time to do this shortly. |
From: Electronjockey <ele...@ho...> - 2011-01-21 16:08:21
|
from what I've been able to determine it looks like these bugs are caused by an incorrect version of mscoree.dll present on the target system. |
From: Electronjockey <ele...@ho...> - 2010-04-28 13:19:47
|
Correction/update to this issue: The access log entry is actually: "GET /TestApp2/(S(zspamq5blelk00rxi4prldev))/Default.aspx HTTP/1.1" 404 The page that is returned is a asp.net error page: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /TestApp2/Default.aspx This would seem to suggest that the request is at least reaching the asp.net runtime. The System.Web.SessionState.SessionStateModule httpModule is added in the web.config. Electronjockey wrote: > I was going back through some of the old mailing list threads, and I > came across : > http://mail-archives.apache.org/mod_mbox/httpd-cli-users/200412.mbox/%3C6...@po...%3E > > I read that Microsoft only added cookieless sessions to asp.net in order > to support mobile devices that couldn't handle cookies. I also read > about the obvious security risks that using this method causes. > Never-the-less, I tried resolving the issue by using a configuration > like this: > > <Directory "/htdocs/Tests2"> > > # Set custom headers > <IfModule headers_module> > Header set X-Powered-By "ASP.NET" > </IfModule> > > Options FollowSymlinks > AspNet Files Virtual > Order allow,deny > Allow from all > DirectoryIndex Default.aspx > > </Directory> > > # Attempt to enable cookieless sessionstate > # This still doesn't work > <Location ~ "^/TestApp2/\(S\(.{24}\)\)/.*"> > SetHandler asp.net > AspNet All > </Location> > > the \(S\(.{24}\)\) represents the string that is generated for the > session key by the app. I end up with a 404 in the access log for > /TestApp2/Default.aspx, which doesn't make much since, as it works when > I'm using cookies for sessionstate. > > ------------------------------------------------------------------------------ > _______________________________________________ > Mod-aspdotnet-users mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users > > |
From: Electronjockey <ele...@ho...> - 2010-04-27 22:29:30
|
I was going back through some of the old mailing list threads, and I came across : http://mail-archives.apache.org/mod_mbox/httpd-cli-users/200412.mbox/%3C6...@po...%3E I read that Microsoft only added cookieless sessions to asp.net in order to support mobile devices that couldn't handle cookies. I also read about the obvious security risks that using this method causes. Never-the-less, I tried resolving the issue by using a configuration like this: <Directory "/htdocs/Tests2"> # Set custom headers <IfModule headers_module> Header set X-Powered-By "ASP.NET" </IfModule> Options FollowSymlinks AspNet Files Virtual Order allow,deny Allow from all DirectoryIndex Default.aspx </Directory> # Attempt to enable cookieless sessionstate # This still doesn't work <Location ~ "^/TestApp2/\(S\(.{24}\)\)/.*"> SetHandler asp.net AspNet All </Location> the \(S\(.{24}\)\) represents the string that is generated for the session key by the app. I end up with a 404 in the access log for /TestApp2/Default.aspx, which doesn't make much since, as it works when I'm using cookies for sessionstate. |
From: Electronjockey <ele...@ho...> - 2010-04-27 22:19:54
|
While working with the latest source, I noticed that the "Error" option for the AspNet directive which is specified here: http://mod-aspdotnet.sourceforge.net/mod_aspdotnet.html#aspnet doesn't appear to have been implemented. Can the documentation be updated to reflect? |
From: Electronjockey <ele...@ho...> - 2010-04-22 17:57:07
|
Week later. I just updated the solution to VS 2010 and built targeting the 4.0 framework without a hitch. Now back to the GAC-less Apache.Web effort. Electronjockey wrote: > Sharing another success. > Configured mod_aspdotnet to use the .Net 4.0 Framework and successfully > executed a pre-compiled 4.0 app. Haven't yet tested all of the new > functionality. > Will be attempting to build in VS 2010, hopefully later this week. |
From: Electronjockey <ele...@ho...> - 2010-04-13 21:50:24
|
Sharing another success. Configured mod_aspdotnet to use the .Net 4.0 Framework and successfully executed a pre-compiled 4.0 app. Haven't yet tested all of the new functionality. Will be attempting to build in VS 2010, hopefully later this week. |
From: Electronjockey <ele...@ho...> - 2010-04-12 19:16:26
|
Apache 2.2.15 with mod_aspdotnet built on VS 2008 from latest source. I just wanted to share with the group my latest success. I have MVC 1.0 and 2.0 up and running on Apache using our little module. Cracking MVC 1.0 wasn't too too bad. I managed to get several configurations working, but the one below is the simplest. It is a matter of configuring the <Directory> using the SetHandler directive to asp.net. This will force all requests to be handled by the module. Since that means all requests, including static content, you can end up with some odd output if you don't exclude it. I did this in the <Location> directive setting the SetHandler to none. Alternatively you could list out file extensions. <Directory "/htdocs/MvcApplication1"> # Set custom headers <IfModule headers_module> Header set X-Powered-By "ASP.NET" </IfModule> SetHandler asp.net Options FollowSymlinks AspNet Files Virtual Order allow,deny Allow from all DirectoryIndex Default.aspx </Directory> <Location ~ "^/MVCTest/Content/.*"> SetHandler none </Location> MVC 2.0 was only a little more complicated because it eliminated the Default.aspx physical file, which was little more than a placeholder. I had to employ mod_rewrite to force a 301 to the home controller at /home. <Directory "/htdocs/MVC2TestApp"> # Set custom headers <IfModule headers_module> Header set X-Powered-By "ASP.NET" </IfModule> Options FollowSymlinks SetHandler asp.net AspNet Files Virtual Order allow,deny Allow from all RewriteEngine On RewriteBase /MVC2Test/ RewriteRule ^$ Home [R=301] </Directory> <Location ~ "^/MVC2Test/Content/.*"> SetHandler none </Location> |
From: Electronjockey <ele...@ho...> - 2010-03-27 18:08:28
|
It turns out the article was a bit dated, and Rick had an updated article applicable to .Net 2.0. In the update he ended up deciding to copy the assembly to the application's bin vice spooling up a new AppDomain. The problem is that the AppDomain created by ApplicationHost.CreateApplicationHost is not configurable. Under the 1.x framework one could create a new AppDomain and set the PrivateBinPath. This would allow you to avoid the bin copy problem. PrivateBinPath was deprecated in 2.0. So this is the route I have chosen for the moment. I've created a custom configuration in VisualStudio and set a conditional flag around the code that copies the assembly to the bin. This way I can have both "mobile" (i.e. usb portable)and a "static" installations. I still hope to come up with a single build that doesn't require the bin copy. To that end The first article in my research is: http://msdn.microsoft.com/en-us/magazine/cc163701.aspx It's dated Nov '05. So it is also older, but it's more recent than Rick's article. The key part of the article is the section "Changing the ApplicationBase". I'm still trying to understand it and how I might apply it to this problem. The analog in this case is to treat each configured webapp as a plugin, and Apache.Web as the the plugin manager I'm also going to experiment with shadow copying vice "hard" copying of the assembly. I think that'd be much cleaner. I've already started experimenting with creating my own AppDomain, and setting the SetupInformation.ApplicationBase or PrivateBinPath properties, but without much success. I still continue to believe this can be done. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Fri Feb 26 9:00:52 2010 Subject: Re: GAC Alternative This morning I found an article that looks like the answer: http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp In it MS MVP Rick Strahl mentions the limited flexibility of the ApplicationHost.CreateApplicationHost method and instead uses a proxy class in which he creates an AppDomain to load the runtime into which then means that it doesn't require copying the application's main assembly that hosts the class into the virtual directory's BIN directory. Problem solved. Once I translate the code from C# to C++ I'll forward it on to William Rowe for consideration. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Thu Feb 25 8:28:55 2010 Subject: Re: GAC Alternative I added a routine inside the ConnectHost method just before the newHost gets created. I'm not certain this is the best place to put it, and I'm still not happy with the idea of multiple copies. However, most of the articles/blogs I've turned up so far go down this road, because ASP.Net 2.0 requires the assembly that creates the appdomain to be in that app's bin. I just found a CLR Team blog that may take me down another road, but for now the copy routine works. If I'm stuck with this then I have to clean up the code and do things like check to see if Apache.Web.dll isn't already in the GAC, attempt to register it if it isn't, and failing that copy itself to the configured app's bin if it doesn't already exist there (same version). -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Wed Feb 24 9:52:05 2010 Subject: Re: GAC Alternative It must have been some kind of mis-configuration on my part, but this morning the dual copy method seems to be working. I have two mapped applications in the same host, each with a copy of Apache.Web.dll in their \bin (as well as in <APACHE_PATH>\bin. As I mentioned before, this is not necessarily ideal, but it is functional. I was reading a thread concerning working with ApplicationHost.CreateApplicationHost and the developer to overcome this problem implemented a copy method that copied the initiating dll into the application's \bin. I may do something similar in HostFactory.h as part of the call to CreateHost. I'm working with source mod_aspdotnet2_20070817 building in VS 2008 targeting the .Net 2.0 framework. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Tue Feb 23 10:21:50 2010 Subject: Re: GAC Alternative More notes, So far this dual copy of Apache.Web.dll only seems to work if there is only one mapped app, i.e. there is only one secondary \bin copy. This I'm sure has something to do with the AppDomain created by ApplicationHost.CreateApplicationHost which is why it would normally be in the GAC. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... and mod...@li... Sent: Mon Feb 22 11:30:00 2010 Subject: Re: GAC Alternative This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory Configuration Failed Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: Electronjockey <ele...@ho...> - 2010-02-26 14:01:29
|
This morning I found an article that looks like the answer: http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp In it MS MVP Rick Strahl mentions the limited flexibility of the ApplicationHost.CreateApplicationHost method and instead uses a proxy class in which he creates an AppDomain to load the runtime into which then means that it doesn't require copying the application's main assembly that hosts the class into the virtual directory's BIN directory. Problem solved. Once I translate the code from C# to C++ I'll forward it on to William Rowe for consideration. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Thu Feb 25 8:28:55 2010 Subject: Re: GAC Alternative I added a routine inside the ConnectHost method just before the newHost gets created. I'm not certain this is the best place to put it, and I'm still not happy with the idea of multiple copies. However, most of the articles/blogs I've turned up so far go down this road, because ASP.Net 2.0 requires the assembly that creates the appdomain to be in that app's bin. I just found a CLR Team blog that may take me down another road, but for now the copy routine works. If I'm stuck with this then I have to clean up the code and do things like check to see if Apache.Web.dll isn't already in the GAC, attempt to register it if it isn't, and failing that copy itself to the configured app's bin if it doesn't already exist there (same version). -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Wed Feb 24 9:52:05 2010 Subject: Re: GAC Alternative It must have been some kind of mis-configuration on my part, but this morning the dual copy method seems to be working. I have two mapped applications in the same host, each with a copy of Apache.Web.dll in their \bin (as well as in <APACHE_PATH>\bin. As I mentioned before, this is not necessarily ideal, but it is functional. I was reading a thread concerning working with ApplicationHost.CreateApplicationHost and the developer to overcome this problem implemented a copy method that copied the initiating dll into the application's \bin. I may do something similar in HostFactory.h as part of the call to CreateHost. I'm working with source mod_aspdotnet2_20070817 building in VS 2008 targeting the .Net 2.0 framework. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Tue Feb 23 10:21:50 2010 Subject: Re: GAC Alternative More notes, So far this dual copy of Apache.Web.dll only seems to work if there is only one mapped app, i.e. there is only one secondary \bin copy. This I'm sure has something to do with the AppDomain created by ApplicationHost.CreateApplicationHost which is why it would normally be in the GAC. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... and mod...@li... Sent: Mon Feb 22 11:30:00 2010 Subject: Re: GAC Alternative This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory Configuration Failed Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: Electronjockey <ele...@ho...> - 2010-02-25 13:29:08
|
I added a routine inside the ConnectHost method just before the newHost gets created. I'm not certain this is the best place to put it, and I'm still not happy with the idea of multiple copies. However, most of the articles/blogs I've turned up so far go down this road, because ASP.Net 2.0 requires the assembly that creates the appdomain to be in that app's bin. I just found a CLR Team blog that may take me down another road, but for now the copy routine works. If I'm stuck with this then I have to clean up the code and do things like check to see if Apache.Web.dll isn't already in the GAC, attempt to register it if it isn't, and failing that copy itself to the configured app's bin if it doesn't already exist there (same version). -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Wed Feb 24 9:52:05 2010 Subject: Re: GAC Alternative It must have been some kind of mis-configuration on my part, but this morning the dual copy method seems to be working. I have two mapped applications in the same host, each with a copy of Apache.Web.dll in their \bin (as well as in <APACHE_PATH>\bin. As I mentioned before, this is not necessarily ideal, but it is functional. I was reading a thread concerning working with ApplicationHost.CreateApplicationHost and the developer to overcome this problem implemented a copy method that copied the initiating dll into the application's \bin. I may do something similar in HostFactory.h as part of the call to CreateHost. I'm working with source mod_aspdotnet2_20070817 building in VS 2008 targeting the .Net 2.0 framework. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Tue Feb 23 10:21:50 2010 Subject: Re: GAC Alternative More notes, So far this dual copy of Apache.Web.dll only seems to work if there is only one mapped app, i.e. there is only one secondary \bin copy. This I'm sure has something to do with the AppDomain created by ApplicationHost.CreateApplicationHost which is why it would normally be in the GAC. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... and mod...@li... Sent: Mon Feb 22 11:30:00 2010 Subject: Re: GAC Alternative This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory Configuration Failed Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: Electronjockey <ele...@ho...> - 2010-02-24 15:16:57
|
It must have been some kind of mis-configuration on my part, but this morning the dual copy method seems to be working. I have two mapped applications in the same host, each with a copy of Apache.Web.dll in their \bin (as well as in <APACHE_PATH>\bin. As I mentioned before, this is not necessarily ideal, but it is functional. I was reading a thread concerning working with ApplicationHost.CreateApplicationHost and the developer to overcome this problem implemented a copy method that copied the initiating dll into the application's \bin. I may do something similar in HostFactory.h as part of the call to CreateHost. I'm working with source mod_aspdotnet2_20070817 building in VS 2008 targeting the .Net 2.0 framework. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Tue Feb 23 10:21:50 2010 Subject: Re: GAC Alternative More notes, So far this dual copy of Apache.Web.dll only seems to work if there is only one mapped app, i.e. there is only one secondary \bin copy. This I'm sure has something to do with the AppDomain created by ApplicationHost.CreateApplicationHost which is why it would normally be in the GAC. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... and mod...@li... Sent: Mon Feb 22 11:30:00 2010 Subject: Re: GAC Alternative This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory Configuration Failed Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: Electronjockey <ele...@ho...> - 2010-02-23 15:22:16
|
More notes, So far this dual copy of Apache.Web.dll only seems to work if there is only one mapped app, i.e. there is only one secondary \bin copy. This I'm sure has something to do with the AppDomain created by ApplicationHost.CreateApplicationHost which is why it would normally be in the GAC. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... and mod...@li... Sent: Mon Feb 22 11:30:00 2010 Subject: Re: GAC Alternative This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory Configuration Failed Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: Electronjockey <ele...@ho...> - 2010-02-22 16:30:27
|
This mornings research and experimentation has produced an interesting result. If I place Apache.Web.dll in just the <APACHE_PATH>\bin the following error occurs on Apache startup: > mod_aspdotnet: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. > File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' > at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) > at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) > at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) > at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) > at System.Reflection.Assembly.Load(String assemblyString) > at System.UnitySerializationHolder.GetRealObject(StreamingContext context) > at System.Web.Hosting.HostingEnvironment.CreateInstance(Type type) > at System.Web.Hosting.ApplicationManager.CreateInstanceInNewWorkerAppDomain(Type type, String appId, VirtualPath virtualPath, String physicalPath) > at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) > at Apache.Web.HostFactory.ConnectHost(Int32 HostKey) If I place Apahce.Web.dll in the configured appliction's \bin, as expected Apache errors out on startup with the following: > [Mon Feb 22 11:22:52 2010] [error] (-2146304894)Unknown error: mod_aspdotnet: Could not create the .NET interface for the Apache.Web.HostFactory. > [Mon Feb 22 11:22:52 2010] [crit] (-2146304894)Unknown error: mod_aspdotnet: Failed to start Asp.Net Apache.Web host factory > Configuration Failed > > Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' or one of its dependencies. The system cannot find the file specified. > File name: 'Apache.Web, Version=2.2.0.2199, Culture=neutral, PublicKeyToken=9b9b842f49b86351' > at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) > at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) > at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) > at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) > at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) > at System.Activator.CreateInstance(String assemblyName, String typeName) > at System.AppDomain.CreateInstance(String assemblyName, String typeName) If I place Apache.Web.dll in both <APACHE_PATH>\bin, and in a configured application's /bin, the application works. So at this point I have a workable, though less than ideal, solution. I'm now going to do some digging into the first error. I have found some information that suggests calls to System.Web.Hosting.ApplicationHost.CreateApplicationHost require the type passed be registered in the GAC. Now I'm just trying to understand why. Once again what I'm trying to do is get ASP.Net working in XAMPP on a USB drive. Assuming, of course, that a supporting .Net framework is installed on the PC I'm plugged into I'll have a portable asp.net web server. -----Original Message----- From: Electronjockey <ele...@ho...> To : mod...@li... Sent: Sun Feb 21 14:19:15 2010 Subject: Re: GAC Alternative I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? |
From: Electronjockey <ele...@ho...> - 2010-02-21 19:20:00
|
I'm back to my "mobilizing" mod_aspdotnet project and came across this note in the README: And Apache.Web.dll must be in the Global Assembly Cache to participate in the system.web framework. Is there any way around this? Any thoughts? |
From: Todd H. <ele...@ho...> - 2009-08-21 12:39:03
|
Mr. Rowe, At this point in my experimentation I've only been able to get it working with Apache.Web.dll in the GAC. If I remove it from the GAC and put it in Apache's bin the following errors occur when I attempt to start Apache: (-2146747262)Unknown error: mod_aspdotnet: Failed to create Host connector for /test mapped to D:/Development/Apache/htdocs/testapp (-2146747262)Unknown error: mod_aspdotnet: Unable to cast object of type 'System.UInt32' to type 'System.Int32'. I'm trying to track it down now in the code. Todd -----Original Message----- From: William A. Rowe, Jr. [mailto:wr...@ro...] Sent: Thursday, August 20, 2009 4:57 PM To: Todd Hicks Cc: mod...@li... Subject: Re: GAC Alternative Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Feel free to experiment. It is (in fact it must be) loaded within bin/ because it has to resolve libapr-1.dll etc, as I recall. But I don't have the install in front of me. But during the build, mod_aspdotnet.dll is brought into the GAC long enough to ensure the types are exported. That may also be the installer pattern. That's a throwback to early .NET and the overall situation may have improved. ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |
From: William A. R. Jr. <wr...@ro...> - 2009-08-21 05:53:19
|
Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Just recalled "why GAC?" in the installer. This information may no longer be applicable though. There were issues with loading it locally due to some combination of the trust schema and signature. Also, gacutil.exe was advertised as *not available* (unsupported) in a runtime install. If these situations aren't an issue, I don't have a particular issue with changing this. Note that the version is strongly bound, so it shouldn't usually be a problem. Can you provide a little more detail why it cannot land in the GAC? One shortcoming is in the compilation cache, I'm not sure how not registering it in the GAC would affect things. We should watch that since it might have an issue on startup times. |
From: William A. R. Jr. <wr...@ro...> - 2009-08-20 21:24:07
|
Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Feel free to experiment. It is (in fact it must be) loaded within bin/ because it has to resolve libapr-1.dll etc, as I recall. But I don't have the install in front of me. But during the build, mod_aspdotnet.dll is brought into the GAC long enough to ensure the types are exported. That may also be the installer pattern. That's a throwback to early .NET and the overall situation may have improved. |
From: Todd H. <ele...@ho...> - 2009-08-20 20:15:58
|
Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build that's fine, I'm just looking for a little push in the right direction. |
From: David M. <wo...@su...> - 2008-10-21 18:39:11
|
<HTML> <P>Pasted below is how I resolved my issue. Setting the CONTENTTYPE property on the response took care of it. A boolean is declared at top then tested in the render routine. FLUSH, CLOSE, and END should not be used since everything will happen correctly as page processing is allowed to complete normally. Thanks for the assistance.</P> <P> Private NoRender As Boolean = False</P> <P> Private Sub OnCallReport(ByVal tit$, ByVal sql$, ByVal connect As Data.SqlClient.SqlConnection)<BR> UserLog("report", "OnCallReport:" & tit, ui.UserID, Request, connect)<BR> Dim localReport As New Microsoft.Reporting.WebForms.LocalReport<BR> localReport.ReportPath = Server.MapPath("~/OnCallReport01.rdlc")<BR> Dim command As New Data.SqlClient.SqlCommand(sql & " ORDER BY InSort", connect)<BR> Dim reader As Data.SqlClient.SqlDataReader = command.ExecuteReader<BR> localReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1", reader))<BR> Dim parameter() As Microsoft.Reporting.WebForms.ReportParameter = {New Microsoft.Reporting.WebForms.ReportParameter("Report_Parameter_0", tit)}<BR> localReport.SetParameters(parameter)<BR> SubReportConnect = New Data.SqlClient.SqlConnection(DefaultConnect)<BR> SubReportConnect.Open()<BR> SubReportCommand = New Data.SqlClient.SqlCommand("", SubReportConnect)<BR> AddHandler localReport.SubreportProcessing, AddressOf OnCallReportSubreportProcessingEventHandler<BR> Dim bytes As Byte() = localReport.Render("PDF", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)<BR> If Not IsNothing(SubReportReader) Then SubReportReader.Close()<BR> SubReportReader = Nothing<BR> SubReportConnect.Close()<BR> SubReportConnect = Nothing<BR> reader.Close()<BR> reader = Nothing<BR> Response.Clear()<BR> Response.ContentType = "application/x-pdf"<BR> Response.AddHeader("content-disposition", "attachment; filename=OnCallReport.pdf")<BR> Response.BinaryWrite(bytes)<BR> NoRender = True<BR> End Sub</P> <P> Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)<BR> If NoRender Or (Not Response.IsClientConnected) Then<BR> writer = Nothing<BR> Exit Sub<BR> End If<BR> writer.InnerWriter.Close()<BR> Dim sw As New IO.StringWriter<BR> writer.InnerWriter = sw<BR> MyBase.Render(writer)<BR> writer.Close()<BR> Response.Write(EditMenu(sw.ToString))<BR> End Sub<BR> </P> <P><BR> <BR> -- <BR> dgm <BR> <BR> <BR> <B>On Tue Oct 21 11:24 , David McDivitt <WO...@SU...>sent:<BR> <BR> </B></P> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #f5f5f5 2px solid; MARGIN-RIGHT: 0px"> <P>I'm getting there but still don't have it. Instead of using the END method on the response I used FLUSH followed with CLOSE. The report did stream to the client at that point, and the open, save, cancel dialog appeared. But when I clicked open, Adobe said the report was corrupted. Upon examining with notepad, the entire report was there, but followed with page output beginning with doctype and the whole nine yards. If deleted from the file, Adobe would display the report just fine!</P> <P>So I tried to see if I could stop output of the page. Obviously the CLOSE method on the response is not really closing the socket as the documentation says. I declared a common boolean value to be set by the report method, and if found in the render method, rendering was skipped. That does not work. Unless the page is allowed to render in the normal fashion, Apache sends an error page to the client saying the server is misconfigured. I tried substituting report content at the point of rendering, but get the same Apache error page.</P> <P>It would seem Apache is buffering the output and only sends the output if constructed properly. Otherwise it sends nothing generated by ASP.NET and sends the error page instead.</P> <P>I don't know how Apache knows whether the ASP.NET page did a normal page rendering. If bytes are written to the response, that should be the way it is. Apache must be examining the outgoing headers. But, Apache must not be examining the start of the stream, but the entire stream, since Apache let the stream pass even if normal page rendering was at the end.</P> <P>To resolve this I need to know exactly what Apache needs to see in the stream to approve it. I can also cancel normal page rendering, to leave the report, only. Maybe Apache doesn't allow the kind of stream I'm trying to write. Is there a validation feature I can turn off?<BR> <BR> -- <BR> dgm <BR> </P></BLOCKQUOTE></HTML> <BR> |