PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
RE: no touch deployment with parameters
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
RE: no touch deployment with parameters
![]() |
RE: no touch deployment with parameters |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
As it turns out, the exception doesn't occur until I try to read configuration info in my config file via ConfigurationSettings.AppSettings[key]. Something about the URL params have caused the runtime to mistaken params with config file name. I really want to read config data in my config file. The params have nothing to do with config file. How do I tell the runtime to point back to the config file I deployed with my app? I can parse the params.
----- Paul wrote: ----- Hi, I'm trying to pass parameters to a NTD WinForm in an URL, e.g., http://server/app.exe?param1=x¶m2=y. Unfortunately, I get either a ConfigurationException or Error loading XML file. I don't get these when I run the app directly (with default test params). Can someone shed some light on this? Thanks, Paul |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Paul,
You can add "System.Reflection" and then use AppDomain.CurrentDomain.BaseDirectory & AppDomain.CurrentDomain.SetupInformation.ConfigurationFile to debug what the configuration file and location are that it is looking for. It should load the config file from your web server.. http://server/app.exe.config As long as your config file is in the same spot as the executable and you the above values are pointing to the right information, it should load fine. If not then I am just as confused as you are ![]() Hope this may help. "Paul" <anonymous@discussions.microsoft.com> wrote in message news:1D9D55E3-6EC8-40D4-B3B9-048F993CEAB7@microsoft.com... > As it turns out, the exception doesn't occur until I try to read configuration info in my config file via ConfigurationSettings.AppSettings[key]. Something about the URL params have caused the runtime to mistaken params with config file name. I really want to read config data in my config file. The params have nothing to do with config file. How do I tell the runtime to point back to the config file I deployed with my app? I can parse the params. > > ----- Paul wrote: ----- > > Hi, > > I'm trying to pass parameters to a NTD WinForm in an URL, e.g., http://server/app.exe?param1=x¶m2=y. > > Unfortunately, I get either a ConfigurationException or Error loading XML file. I don't get these when I run the app directly (with default test params). Can someone shed some light on this? > > Thanks, > Paul |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Take a look at the article I posted, these sections explain what you need to
do: Mapping .EXE Files to the Handler Once you've mapped .EXE files to ASP.NET and implemented a .NET handler to serve up .exe and .exe?blah.config files, you still need to let ASP.NET know which handler to use for .exe files. You do this in the web.config files for your ASP.NET application: <configuration> <system.web> <httpHandlers> <!-- map .exe and .exe?blah.config files to our handler --> <add verb="*" path="*.exe" type="Genghis.Web.ConfigFileHandler, ConfigHandler" /> </httpHandlers> </system.web> </configuration> When ASP.NET sees this <add> element in the <httpHandlers> section, it'll map all HTTP for paths ending in .exe to the ConfigHandler assembly and the Genghis.Web.ConfigFileHandler class (the IHttpHandler implementation shown previously). ASP.NET will look for the web.config file in the root of the Web application and for the assembly in the bin directory at the root of Web application, so be sure to put the files in the correct place. Letting IIS and ASP.NET Hand Out .config Files After routing requests for .exe files from IIS to ASP.NET, writing the handler to pass back .config files, routing ASP.NET requests for .exe files to that handler, there remains two additional configuration steps. The first is because IIS doesn't allow .config files to go out the door unless anonymous access is enabled. You'll need to check the Anonymous access option in the Authentication Methods dialog of your IIS Web application's Directory Security, as shown in Figure 4. -- Greetz, Jan __________________________________ Read my weblog: http://weblogs.asp.net/jan "Paul" <anonymous@discussions.microsoft.com> schreef in bericht news:1D9D55E3-6EC8-40D4-B3B9-048F993CEAB7@microsoft.com... > As it turns out, the exception doesn't occur until I try to read configuration info in my config file via ConfigurationSettings.AppSettings[key]. Something about the URL params have caused the runtime to mistaken params with config file name. I really want to read config data in my config file. The params have nothing to do with config file. How do I tell the runtime to point back to the config file I deployed with my app? I can parse the params. > > ----- Paul wrote: ----- > > Hi, > > I'm trying to pass parameters to a NTD WinForm in an URL, e.g., http://server/app.exe?param1=x¶m2=y. > > Unfortunately, I get either a ConfigurationException or Error loading XML file. I don't get these when I run the app directly (with default test params). Can someone shed some light on this? > > Thanks, > Paul |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hi Jan,
Do you know why Anonymous has to be enabled in IIS in order to pass .config files? This doesn't make any sense to me and I can't seem to find an explanation anywhere. Thanks, Mark |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 


