I'm building application using WCF RIA services and silverlight running on azure dev fabric. I have a solution with silverlight client projects, a Web client project and WCF projects. I placed breakpoints in silverlight project and WCF project (in app.xaml.cs) so I can step thru the code on both side. I break in my WCF code but I can’t jump in the silverlight code. When I looked at the silverlight breakpoint while debugging, the red dot displays an exclamation mark and this message: "The breakpoint will not currently be hit".
I’ve done several things to solve this:
Made sure that the ClientBin folder contains the correct .xap file.
The folder contains the correct xap.
Checked the solution if it was in release mode, but apparently I was
in Debug mode
Checked if silverlight debugging is enabled in web site, yes it was
enabled. I’m able to debug the silverlight running on separate
instance (not in azure).
Deleted bin/debug and or bin/obj folder but still no good
Deleted the ClientBin folder on silverlight's web role end
point
Deleted the source codes and then retrieve them again from source
control to check if there’s change in source control, still no good.
Apparently the solution in other developer’s workstation works fine, I’m
the only one having this problem.
Reset the iis using iisreset, still nothing good happened
Cleared the browser's cache (I’m using IE9), nothing good
happened.
Anyone ever met this situation? Any answer other than re-installing would be appreciated.
I tried to reproduce this case on new solution with new azure, silverlight and wcf project and everything works fine. There was no problem in debugging either silverlight or wcf project.
Thus, there is nothing wrong with my VS or browser setting.
I tried to use a copy of the other developer's solution and there's no trouble in debugging. I have no idea why such thing could happens because the solution is basically the same (All of the csproj.user and suo files are not checked in to source control.)
Go to your Solution >> Properties >> Set the silverlight project as the startup project.
Related
I'm testing an application I just published using the free option that Azure gives us.
In this process I found out that I need to make a change to a Controller (ASP.NET Core 2.0) and I've been looking for the options to do so.
I've encountered with Azure App Service Editor and I'm reading some documentation about it. However, it does not seem the way to do this kind of change since I can't access the *.cs files thru this service. This is the list of files that are shown:
So, my question is:
Is there a way to edit these files (controllers, views) with Azure App Service Editor?
If no, what would be the way to reflect this changes on my already published application? Also, in the case the answer is "republish the project", is it possible to do so without alter the information contained in the database that has been added during this test process and only update the modified files?
I apoligize if these questions are very basic but I'm just getting started to know about Azure. Thanks in advance.
How I publish it:
In order to publish this project I used the option Visual Studio gives us:
Now, if I go to the same option, this windows shows up:
Question: If I hit the 'Publish' button I believe it will republish, the whole project, correct (the database included)? If this is the case, I believe there will be conflicts about the databases, since I have already information in the project published and other information in the local project. Is it possible to reflect the update for everything but the databases?
No, you can't update the files there as this is a compiled web app, so you have to publish the update.
I'm assuming you're using EntityFramework and originally publishing the database via the web publish.
If you click "settings" on the publish dialogue, on the second page (settings tab) you'll see the options for publishing the database.
Here you'll see options as to whether to update the database during deployment, this I believe is to apply migrations. But if you uncheck these it should not update your database at all.
You should verify this after saving the publish by looking at the generated publish profile (you don't have to do a publish to see this)
It will be located at "YourApp\Properties\PublishProfiles" and should have been added to your solution, and will be called something like "Your App - Web Deploy.pubxml"
Within this you will see a <PublishDatabaseSettings> section, where the Enabled properties should be set to False
However I would advice that before publishing any update:
Test the deployment to a new server
Back up the database before deploying and test you can restore from it.
I've been new to silverlight applications and trying to figure out this issue for past few days.
I tried creation a silverlight application in VS 2012, there are two separate projects created,
With Xaml files where the actual content exists
The .Web project where the .xap file is created.
When I tried running this through VS with breakpoints in the first project through IE the breakpoints were connected quite well.
When I tried hosting this project on IIS and tried running it on IE, it worked. (I hosted the .Web project only)
While I tried browsing the silverlight app from IIS and attached the process to IE with type silverlight,x86 in VS with those breakpoints in project 1, I was unable to hit them.
Please help me to debug my silverlight app when I try to browse it from IIS.
I tried everything I could think of so far. A hint would really be helpful.
Thank you.
Phew, finally this is fixed. Everything was precisely as it was supposed to be, I just missed out on the flow that was necessary. Below is the approach to debug silverlight app through IIS
Create a new silverlight app in vs
build it and create a new website in iis
in website add the silverlight.web project
add breakpoints in silverlight app from the same path as hosted in iis
browse the aspx page of .web from iis
click on attach to process (while the aspx page in running in IE) and search for iexplorer with type silverlight,x86 and click attach. (Make sure you're running VS in admin mode).
Refresh the IE page, and voila you have what you want.
I am using visual studio 2010 on .net4.0 for my projects and I've found that each time I do a change in my project, I build and run but I cannot see my changes. I've found this happening once or twice mostly with my web service projects. I'm no pro with web services and am encountering this problem for the first time so would be grateful to anybody who can tell me what has gone wrong with my project and how to fix it.
Edit
My asmx file is where I have added an additional method but am not able to see it when I run F5
When you change the compiled code in a web service or site, you need to make sure you restart the web server hosting that service or site.
You are probably using the ASP.Net Development Server. Although Visual Studio starts this server for you, it does not restart it automatically when you rebuild. As a result, the server will still be referencing the previous version of the assembly that you changed.
In the Windows system tray you should see one or more icons depicting a web page with a purple gear overlapping it at the bottom-left.
There are three of them in this example:
You can stop the server by right-clicking its icon and selecting "Stop". (If you have more than one, you will learn to identify the one you need to stop by recognizing the port number shown in the tooltip when you hover the mouse over the icon.) Visual Studio will restart it when needed.
When you're making changes to a service or site, use this workflow:
Make code changes
Stop the ASP.Net Development Server
Rebuild the project containing the changes
Run
Client-side code vs. Server-side code
If you're changing client-side code (HTML or JavaScript), then you may need to force your web browser to refresh its cache. In Windows this is normally done by pressing CTRL+F5 in the browser (see refreshyourcache.com/en/cache for more info). If you're changing compiled code (C#), and restarting the server doesn't help, try restarting Visual Studio, then do Build -> Clean Solution, then Rebuild.
If you are facing issues in ASP.Net Development Server, I think you are better off creating a virtual directory in IIS and host your web service there. That way you should be able to make your changes, just build it (don't run it) and that should be available on your virtual directory and you just browse to webservice. Then you don't have to hit F5 again and again and don't have to worry about instances of ASP.NET dev server.
Following article contains good step-by-step instructions on how you do it on IIS 7.0. This article is about hosting a website - however, hosting a webservice is not different.
http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
I'm writing an ASP.NET web service, in C#. Before yesterday if I wanted to debug it I would just press F5, and ASP.NET Development Server would start hosting my service. Breakpoints would be enabled and would work. Recently this functionality is gone. Now when I start debugging, Development Server is started but the old version of my web service is hosted, and breakpoints do not work. I get a warning that versions do not match.
It does not help if I rebuild everything, or change the assembly version, or even change the file name of the DLL. It does not help if I delete the whole temp folder %TEMP%\Temporary ASP.NET Files. Old web service will be pulled out from who knows where, and stored in temp folder again.
Major change before yesterday was that I had installed IIS. Web service that is installed there works as expected, but I need to debug it as well. I thought that the problem is that I installed the web service (with vdproj), so I uninstalled it, but this did not help either.
How to prevent the system from caching the old version of web service. Where is this old version stored anyway?
Check the Web settings on your ASP.NET project. To get back to using the ASP.NET Development Server for F5 debugging make sure the "Use Visual Studio Development Server" radio button is selected under the Server heading. I also specify a specific port so other projects in my solution can consistently reference it (in my case I'm dealing with a web service). There's a good chance that you will find the "User Local IIS Web server" radio button selected.
Hope that helps.
EDIT: The problem here is not about IIS, but about changing the target build output folder of web service. It must be bin\, or Development Server cannot find it. Rebuild did not help because it would change dll file in new folder, but old file would remain undisturbed in bin folder.
I'm using a native DLL (FastImage.dll) in a C# ASP.NET Web Service that sometimes locks (can't delete it---says access denied); this requires stopping IIS to delete the DLL. The inability to delete this DLL in the bin folder of my published Web Service prevents me from publishing successfully (even though it thinks it published successfully!), which makes development and fixing the bug difficult (especially when it just happily runs old code since my changes may not be reflected on the server!). Note that the bug causing the Web Service to bomb and lock up the DLL is in my code, which is outside of said DLL, so I think this is a more general problem than just the FreeImage library (not to bring them any heat).
Has anyone experienced this?
Is there a way to make sure that when it says "Publish succeeded" from the VS IDE that it really means it, or to run sort of script to check that the files are really deleted before it attempts to Publish (like a pre-build step in VC++). (Right now I manually delete the files before publishing to make sure that I know the DLLs were replaced, instead of running old DLLs. It's still a problem, though if I can't delete the DLL.)
How would I detect whether a file was successfully deleted from a batch file? (so I can stop and start IIS if it fails)
Is it possible to stop and start IIS from a script (preferably from the Publish... action in the VS IDE) and if so, how?
Using the IISReset command line tool will only restart IIS on the local machine, not on a remote server to which you are publishing.
Assuming that you are publishing to a Windows 2003 server, I'd suggest trying the slightly less drastic step of stopping and restarting the IIS AppPool in the web site or virtual folder in which the web service runs. (That way you are not taking all sites that run on the target server offline.) This too assumes that the web service runs in its own app pool. Ideally it should, so you keep it isolated.
I'd recommend getting away from using the Publishing process and to look into using a Web Deployment Project. Here is a post on ScottGu's blog detailing VS 2005 Web Deployment Projects.
The advantage to the Web Deployment Project approach is that it provides you with all the power and capability of MSbuild, as it is really just a convenience wrapper around MSBuild. Here's a post from the MSBuild team about pre-build and post-build capabilities
Hope this helps.
You could use the IISReset command line tool to stop/restart iis. So you could write a simple batch file to stop iis, copy your files, and then restart iis. I'm not sure how to integrate this with the VS publish feature however.