I have a vb.net web application in visual web developer 2008 with a dll file and i need to debug a method in that dll.
I also have project source files for the dll file itself. How could i make the web application use the source instead of the dll file so that i'd be able to debug it?
I've tried debugging the dll project itself, but it's not a very good solution, because it seems the dll depends on the web application settings and data and it would simply be too much work to get it working.
If you have your web application running locally, open up your DLL project and then attach the debugger to IIS.
Related
I have a simple .NET WebForms application with ArcGIS Runtime SDK for .NET 10.2.6.0 installed on the development machine running MS Visual Studio Professional 2013.
When I run my ASPX page locally, no issues. But when trying to do the same on the web server where I copied the project via FTP, I get the following runtime server error:
Error initializing ArcGISRuntimeEnvironment. Unable to find ArcGISRuntime deployment folder. To create a deployment run the ArcGISRuntime Deployment Tool to create a folder called arcgisruntime10.2.6
ArcGIS deployment folder VS is using on the development machine is probably within the GAC :
C:\Program Files (x86)\ArcGIS SDKs\DotNet10.2.6\WindowsDesktop\bin\arcgisruntime10.2.6
I uploaded ArcGIS DLL & deployment folder on the server via FTP as follows:
/site/wwwroot/bin/Esri.ArcGISRuntime.dll
/site/wwwroot/bin/arcgisruntime10.2.6/
/site/wwwroot/bin/arcgisruntime10.2.6/client32/
/site/wwwroot/bin/arcgisruntime10.2.6/client64/
ASP.Net page I run is at the root:
/site/wwwroot/TestPage.aspx
and the business logic CS file at:
/site/wwwroot/Content/Geometry.cs
So where the ArcGIS deployment folder has to be created if not in the /bin ? Also are client32 & client64 enough to avoid the runtime error, knowing that I haven't copied LocalServer and resources subfolders? Perhaps I should change ArcGISRuntimeEnvironment.InstallPath but I don't know how to do that.
Thanks
The runtime SDK can't be used for server side applications as it's against the licensing requirements. You need to switch to using ArcGIS Server or Portal.
I recently installed the package [Navigation] to an ASP.Net 4.5 Web Application. While I am running it on my local machine [I have VS 2012 installed] it works fine, but when I deploy to the production server I am receiving the error: Could not load file or assembly 'System.Web.WebPages'. I have added references to Syste.Web.WebPages and Syste.Web.WebPages.Deployment but no luck.
You need to set the reference to copy local so that the dll appears in your bon folder or alternatively use the "add deployable dependencies" function in vs for a better way.
the problem is your production server doesn't have the library in it's gac so you need to provide it.
Do it this way, http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx however it is an MVC project but will work for you.
I am referencing Microsoft.Office.Interop.Word.dll in my asp.net web application at development server.
No i need to move this app from development server to testing server.
I can't see the dll in the bin folder of the app as it is pointing to GAC.
How should i reference the above specified dll in testing server?
Do we need to do anything with web.config?
Please advice.
Thanks,
Ram
Visual Studio uses different sets of the PIAs on the development computer. These different sets of assemblies are in the following locations:
A folder in the program files directory.
These copies of the assemblies are used when you write code and build projects. Visual Studio installs these assemblies automatically.
The global assembly cache.
These copies of the assemblies are used during some development tasks, such as when you run or debug projects that target the .NET Framework 3.5. Visual Studio does not install and register these assemblies; you must do this yourself.
Link
If not found DLL you have to download from internet....
IDE: Visual Studio 2010
.NET 4.0 x64 running on Windows 2008 R2 x64
All projects are configured for x64 platform.
When I compile the web application project, it puts all the required DLLs in the bin directory...HOWEVER, the web application's DLL is inside the \bin\x64\Debug.
This causes the dev web server (I use ultidev but this affects VS web server as well) to try to load the web application DLL from the \bin\ directory..but because it isn't there, it throws an exception failed to load type 'Global' (global.asax page). If I copy the web app dll from \bin\x64\debug to \bin\, it works fine.
Why isn't VS putting a copy of the web app dll to the \bin\ directory?
In the project properties (right click on the web project, at the bottom click properties) open the "Compile" section. You should see "Build output path" with a textbox below it and a browse button. Change the build output path to "bin\"
Due to another issue this didn't help me directly but did get me thinking.
I had to right-click on my project, "unload", then right-click again and edit the project.xml which included the outputPath variable.
That one was difference somehow so I edited it to point to "bin\", saved, right-clicked on the project one final time, choose "reload" and went about business as usual.
That solved my problem along with the issue of my break-points not being hit (because I had old files in bin\ which weren't getting cleaned up thanks to the bad path).
I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted.
So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory. Now I have decided to start a new ASP.NET MVC web application that will eventually replace the older (non-MVC) web site. But I cannot for the life of me figure out what Visual Studio modified to get the XAP to automatically appear in the web site's ClientBin on build, so that I can reproduce that on my MVC site.
So my question is essentially, what are the manually steps for getting Visual Studio to autocopy a Silverlight application's XAP to a newly added ASP.NET MVC web application?
You can do this through the properties of your web project. The Silverlight tools for visual studio add a new tab to the properties of web projects named "Silverlight Links".
Add a reference to your Silverlight project here, with the folder where you want it, and visual studio will make the copy for you.
The copying of the XAP to the ClientBin is a MSBuild task. If you're using a standard ASP.NET project template it can be found under the Silverlight Link section.
For everything else you might be able to figure out the name of the MSBuild task and add it to your ASP.NET MVC project. The easier solution would probably be to use a custom post-build event on the APS.NET project to copy the file.
There is no "magic" happening, oter than copying the XAP file from the BIN directory of your Silverlight project to the ClientBin of your web application. It doesn't even have to live inside the ClientBin directory - you can copy it to any directory, or the root of your site.
Update: The recently released Beta 1 of ASP.NET MVC includes support for Silverlight projects, so you can link it to your ASP.NET MVC application the same way you do for regular ASP.NET applications.
Go to the property pages of your Silverlight application, Choose Build Events Tab, Enter following line in Post-Build events command line:
copy $(TargetDir)*.xap $(SolutionDir)<youar web solution folder name such as app.web>\ClientBin
Now onwards, on each successful build, the xap file will be copied automatically.
This is a somewhat older post so it probably has changed... in my Visual Studio under the web project there is a tab called "Silverlight Applications". There is an add button there for existing projects that you import into the solution and you can add them and choose to place the xap in the ClientBin or anywhere else. Not sure if you have to have the SDK installed to have this tab. I have it installed so you may have to. I don't do MVC, so it may be different for MVC projects, I don't know.