![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | What is the best way to debug WPF apps hosted in a browser? Hi all, I run into some problems with Visual Studio 2005 and the latest CTP of WPF. Sometimes it is hard/impossible to debug applications hosted in a browser. Problem 1) When I first create a new project in VS everything is fine. After some time and a lot of rebuilds I run with different applications in a problem that debugging the application does not work any longer. The following error occurs: Microsoft Internet Explorer: cannot find file "file:///C:/Documents%20and <...path to project dir...>/bin/Debug/MyApp" And then the browser starts with the default homepage and not with my app. MyApp is the name of the project and this file does not exist. Is there some extension missing like .xbap? I assume that this path comes from the Debug Options in the project properties (Start Options / Command line arguments). But this was never changed. What is the exact meaning of this parameter? How do I get rid of this message? Rebuild all does not help either. Problem 2) Of course I want in debugging the same environment as in real life. In Sells and Griffiths WPF book there is a nice hint at the end about some options in dialog Security advanced options: "Debug this application with the selected permission set" Great! So I get all my security exceptions during Debugging. But if I enable this option I always get error message: "The current project settings specify that the project will be debugged with specific security permissions. In this mode command line arguments can not be passed to the executable. Do you want to continue debugging anyway?" What is the way to avoid this message and have the security settings applied in debugging? Problem 3) In the same dialog there is the option: "Debug this application as if it were downloaded from the following URL: ... " Great! so app behaves the same in debugger as if run in the browser But there is some other option in Debug/Start Actions: Start external Program (defaulting to PresentationHost.exe) or Start browser with URL How are these settings related to each other? When do I have to use PresentationHost.exe and when the browser? Problem 4) Even if the version number is increased it seems that IE only uses an updated version of my application when all browser instances are closed. Is this true? And by the way for debugging purposes it would be nice to have an addiditonal option in the Publish tab of the properties dialog to increment revision with each build (and not only with each publish) One additional information: I do not host my application in IIS but instead in Tomcat (because the application has to communicate with a servlet). But this should not make any difference (and works perfectly!), right? Thanks for any help. Jens |
| | #2 (permalink) |
| Guest | RE: What is the best way to debug WPF apps hosted in a browser? Regarding problem 1), I think it's a bug. A workaround is to open the .proj file in Notepad and cut this line <ApplicationExtension>.xbap</ApplicationExtension> and paste it BEFORE this line <StartArguments>-debug "$(MSBuildProjectDirectory)\bin\$(Configuration)\$(AssemblyName)$(ApplicationExtension)"</StartArguments> And, yes, it works OK in Tomcat, in fact it works with any HTTP server. -- Valentin Iliescu [MVP C#] "Jens" wrote: > Hi all, > > I run into some problems with Visual Studio 2005 and the latest CTP of WPF. > Sometimes it is hard/impossible to debug applications hosted in a browser. > > Problem 1) > When I first create a new project in VS everything is fine. After some time > and a lot of rebuilds I run with different applications in a problem that > debugging the application does not work any longer. The following error > occurs: > > Microsoft Internet Explorer: > cannot find file "file:///C:/Documents%20and <...path to project > dir...>/bin/Debug/MyApp" > And then the browser starts with the default homepage and not with my app. > MyApp is the name of the project and this file does not exist. Is there some > extension missing like .xbap? I assume that this path comes from the Debug > Options in the project properties (Start Options / Command line arguments). > But this was never changed. What is the exact meaning of this parameter? How > do I get rid of this message? Rebuild all does not help either. > > Problem 2) > Of course I want in debugging the same environment as in real life. In Sells > and Griffiths WPF book there is a nice hint at the end about some options in > dialog Security advanced options: > > "Debug this application with the selected permission set" Great! So I get > all my security exceptions during Debugging. But if I enable this option I > always get error message: > > "The current project settings specify that the project will be debugged with > specific security permissions. In this mode command line arguments can not be > passed to the executable. Do you want to continue debugging anyway?" > > What is the way to avoid this message and have the security settings applied > in debugging? > > Problem 3) > In the same dialog there is the option: "Debug this application as if it > were downloaded from the following URL: ... " > Great! so app behaves the same in debugger as if run in the browser > But there is some other option in Debug/Start Actions: Start external > Program (defaulting to PresentationHost.exe) or Start browser with URL > How are these settings related to each other? When do I have to use > PresentationHost.exe and when the browser? > > Problem 4) > Even if the version number is increased it seems that IE only uses an > updated version of my application when all browser instances are closed. Is > this true? > > And by the way for debugging purposes it would be nice to have an > addiditonal option in the Publish tab of the properties dialog to increment > revision with each build (and not only with each publish) > > One additional information: I do not host my application in IIS but instead > in Tomcat (because the application has to communicate with a servlet). But > this should not make any difference (and works perfectly!), right? > > Thanks for any help. > > Jens > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Security questions around browser hosted control interaction. | mrmoosehead | .NET General | 7 | 05-13-2008 07:50 AM |
| WCF service hosted in IIS | soworl | .NET General | 0 | 03-07-2008 10:56 AM |
| How to perform an http get request from a browser hosted applicati | Jens | Avalon | 1 | 04-07-2006 09:17 AM |