I am compiling asp.net 2.0 code. I have IE 8. When I compile application, it open two browser. One browser is blank and other one show web form after a while.
why it happening?
You have 2 web projects in the solution and it's starting both of them up. To avoid this, go to properties on the one you don't want, the Web tab, then change the Start Action to Don't open a page.
Related
In old sweet Web Forms times, when we make change on code behind, once we hit the application, it was compiling on the fly and running new changed code.
For Web Apps and MVC, when I add a new controller or change something on business logic, I have to always build app on VS 2015 manually and go back to browser and test again. But many times I keep forgetting building till I see yellow error screen.
Is there any way to kick build if there is code change and if I hit the website first time like Web Forms? I would not prefer to build on save since I am a ctrl + S freak, and keep pressing that combo on every other second.
To my knowledge Dynamic Compilation is not available in an MVC application because it won't be a "Web Site" project, it will be a "Web Application" project. Only Web Site projects can do dynamic compilation, since with MVC you're routing to actions in the controller my guess is it has to be compiled in advance - unlike ASP.NET where you're routing to a physical file.
I'm an ASP.NET Web Forms developer who has recently switched over to an MVC web app.
I'm having difficulty working out the quickest way to preview code changes when running the MVC web app through the integrated Visual Studio web browser.
In web forms, I can make a change to the codebehind and simply refresh the page and it's all good.
In MVC, I seem to have to close the tab in the browser, return to Visual Studio and press F5, wait for it to build every single dependent project and open up a new tab in the browser to display the page. This is so much slower than how it works in Web Forms it's driving me to distraction.
Am I doing things right? Is there a way to speed this cycle up?
The view pages themselves are compiled dynamically and thus any changes to these can be viewed simply by saving the changes and refreshing the pages in the browser. Changes to code made elsewhere, however, will require a rebuilt after which you can refresh the page.
Pressing F5 will start the web server (if it isn't already started) and then attach a debugger to the process after which it will fire up the web page. The first two steps are very slow, and you should avoid them unless you specifically need to start the web server or debug the application.
So
Changes to view: ctrl+s -> refresh web page (f5)
Changes to code: ctrl+shift+b -> refresh web page (f5)
I used to find setting my project to run via IIS, rather than Cassini, made it a bit quicker. If you've made changes to the code, you'll still have to compile the solution, but at least this way you aren't waiting for Visual Studio to slowly crank itself into gear every time.
Found this article that might provide some clues too:
What are the (dis)advantages of using Cassini instead of IIS?
We're developing .Net Application using asp.net and C# and .Net Framework 3.5.
We are using windows form message box in a .Net application.
This windows form works great on the debug mode but once we publish the application this message box won’t work.
We are referencing System.Windows.Form.dll in order to use the message box features.
Kindly advice if we need to register this DLL or follow some configuration steps in order to solve this problem.
Thank in advanced,
Jad
Don't use MessageBox in a web application. It will show up on the server console, there's nobody around to click the OK button. I assume that ASP.NET has some counter-measures against it, given that it is such a serious denial-of-service attack.
If you are using unreferenced classes a project/solution is usually not even compiled.
So probably the problem is in another place. Are you sure that the code that should display the MessageBox is executed?
EDIT: When you develop web applications (ASP.NET), as described by you in comments, you cannot use Winforms MessageBox.
Try showing it with javascript, if you really need it
Response.Write("<script>alert('This a message')</script>");
I'm using Visual Studio Web Express 2008 to develop an ASP.Net website. I have a master page that every page inherits from and on that master page I have the asp:menu control. On my local machine the menu control works just fine. The javascript is emitted and the links work as well.
However, when I upload it to my webhost service provider, the javascript is not emitted and my links do not work. I'm getting a feeling that my service provider really doesn't know much about .Net as they suggested that I make sure that I upload the .js files which isn't necessary.
Does anyone have any suggestions that I can give them? They're asking me what requirements are needed. It seems to me that something is not setup on their server properly but according to them, they have .Net 3.5 SP1 installed.
Everything for the control should be in the framework (no extra steps necessary); make sure in IIS they set it up to use the 2.0 version of the framework (which is probably the case)...
The cases of errors where I've seen that is when the framework isn't installed.
there is an http debugging tool called fiddler that will help you to see what is going wrong with the menu and related site resources. See the requests those are returing 404 and it will help you a lot to head towards the solution faster
I have 2 asp.net web applications, one of which is the main application and the second one is referencing the first application for like master pages , themes etc, and the main frameset that will point to the second application's webform based on database values (menu generated from database);
All my actual forms are in the second application, but the problem is when I set a breakpoint on the javascript file on my second application, it doesnt go into the breakpoint?
Any advice please? I need to get the debugger working, without having the need to put in the "debugger" keyword in javascript if possible.
My IDE is visual studio 2008 SP 1 and IE 8 as the browser.
Cheers
Do you have the solution set up to start up both projects with debugging when you start the debugger? To set multiple startup projects, right-click on the solution. Choose Set Startup Projects. In the dialog, select multiple startup projects and set the two web sites to start up with debugging when the debugger is started.
For what it's worth, I usually like to debug my javascript in Firefox with Firebug. I much prefer that to the developer tools in IE 8.