I'm working on a web application, where the backend is built in MVC 3. When I run my project in Visual Studio 2010, the app is making jQuery Ajax calls to the IIS to get the data, which is then displayed in the browser/frontend. However, I prefer to use writing HTML/CSS/JavaScript in Aptana Studio 3, and thought that I could call my MVC controller from my project in Aptana.
In Visual Studio, I have to type "Users/ListUsers" as the url for the Ajax call, however, when I try to call the same url by using "http://localhost:51845/Users/ListUsers" in Aptana, the Ajax request is made but there is no data returned, which seem to have something to do with the same origin policy.
Is it possible to make Aptana communicate properly with IIS/ MVC controller or do I have to do all the work in Visual Studio?
What did I do to solve the problem so far?
1) Checked what "http://localhost:51845/Users/ListUsers" returns by using WFetch, which shows the Json Object returned.
2) Fiddled with Aptana > Project > Properties > Preview Settings.
3) Fiddled with Aptana > Run > Run Configurations.
4) Searched Aptana support, stackoverflow and Google.
Thanks for any help or tossing me into the right direction!
Related
I have updated my visual studio to version 16.10.2 (enterprise).
Now when I run my Asp.net Core 5 Web API, every time I modify something in my code, visual studio runs a task in the background, and with that, chrome refresh my swagger UI, and all my data get lost.
How can I stop this behavior?
I have always used swagger UI to test my APIs, but this behavior of visual studio is really annoying!
See the video for better understanding: video
There is an option in visual studio which will refresh chrome every time you save something.
you can disable this behavior by selecting none.
Go to: Tools > Options > Projects & Solutions > ASP.NET Core > Auto build and refresh options = and put it to none
I am working on Dotnet Core + Angular application with Visual Studio 2019. After publishing code in release mode and deployed on IIS. When I changed the code to debug and tried to debug something the breakpoints are not getting hit on any controller. Does anybody ever faced this problem, it would be helpful to have any solution on this. Here is my project properties
Visual Studio 2019 break point is getting hit
This is indeed a very strange behavior and I suggest you could try these suggestions to troubleshoot your issue:
Suggestion
1) Right-click on your project-->Properties-->Build-->Advanced-->change Debugging Information to Full.
2) make sure that you use IIS Express with Google Chrome or change to use IE to debug your project
3) Tools --> Options-->Debugging-->Symbols--> select Microsoft Symbol Servers-->Click Load All Symbols
4) close VS Instance, delete .vs hidden folder under solution folder, bin , obj folder and then restart your project to test again.
Update 1
Based on your issue, JS sent request to Core and could not enter the breakpoint, you can try these steps:
1) enable option Javascript Debugging for Asp.Net(Chrome,Edge and IE) under Tools-->Options-->Debugging-->General
2) If you try to debug js on cshtml, you should move these js into a single javascript file and then reference such js file in cshtml. You can refer to this link.
Hope it could help you.
Using Visual Studio 2010, MVC 3 (release version) I'm getting this error when opening a specific project which was a traditional web forms project to which I've added MVC:
"The Web project '' requires missing web components to run with Visual Studio. Would you like to download and install the using the Web Platform Installer now?
ASP.NET Web pages with Razor syntax."
I have MVC installed and fully running. Other pure MVC and another mixed Web Forms/MVC project open without any issue.
Clicking "Yes" appears to go through downloading and installing, but the error remains.
Clicking "No" opens the project, where I have intellisense and syntax highlighting for Razor, all my MVC context items (Add View, Add Controller, etc.). In short, everything appears to be working just fine except for what appears to be a bogus error message.
I've done a file compare of the sln, csproj and web.config files and added everything that appears relevant. Prior to doing that I was missing some entries in ProjectTypeGuids the addition of which got the MVC context menus and Razor intellisense working. I tried resetting the ProjectGuid but I still get the error.
I have also previously gone through uninstalling MVC3, MVC2, ASP.NET Web Pages, repairing Visual Studio, installing MVC 3 from the stand-alone installer, and probably a couple more things. I have not yet tried a full system reinstall. I am working from a relatively clean Windows 7 installation. It was a fresh setup about 2 weeks ago and only VS 2010 has been installed (no older versions or betas).
I'm out of ideas at this point. Anyone got any suggestions? I'm a bit confused since this is project-specific, yet the error message indicates that the problem is with Visual Studio.
Update: it gets a little more interesting. Another developer was able to open the same project on his machine without any errors or warnings. So it's something specific to this project on my workstation. At this point I'm willing to write it off as some obscure edge-case bug.
Update 2: And now after rebooting for a system update it's working on my workstation. Definitely some sort of edge-case, and definitely not something I can reproduce.
You can see from the updates, that the problem has gone away after a system-update prompted reboot. So if anyone else has ended up here with a similar problem and you've gone through all the other possibilities, try rebooting.
I'm trying to use Ext.Net with a MVC project in VS2010 but having problems getting the controls to show up (works fine on a regular web project).
There is a Ext.Net demo application here that demonstrates how to build a ext.net MVC application but I'm having trouble building it under Visual Studio 2010.
Does anyone know if it is possible to build the demo under Visual Studio 2010?
The error is:
No overload for method "Build" takes 5 arguments on this line in PartialViewRendered.cs:
string wScript = DefaultScriptBuilder.Create(p).Build(RenderMode.RenderTo, ct, null, true, true);
Ext.Net.Mvc works with latest version of Ext.Net are available in SVN only
You have to wait Ext.Net RC2
Faced that issue couple of months back, basically there is some route that you need to disable in MVC so that the controls can work i guess, not at work today, but will post it tomorrow.
I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin Blend 3 for UI development and Visual Studio 2008 for "code-behind". When debugging the project from Blen 3, it all works well. The Silverlight is automatically embedded into an TestPage and loaded from
http://localhost/TestPage.html
However, when starting the debugger from Visual Studio 2008, the silverlight app is automatically embedded in a TestPage.html, but know loaded from file:// , as in:
file:///C:/Documents%20and%20Settings/JadaJada/My%20Documents/Expression/Blend%203/Projects/JadaJada/JadaJada/Bin/Debug/TestPage.html
And as a result, the application does not work (which might be because the app makes a few HTTP requests to http://localhost/ using a WebClient).
Do anyone know how to make Visual Studio load the TestPage.html from http://localhost/ instead of file:///C:/JadaJada/ ?
Thankful for any help!
IN VS...
Try right click web site and select property pages.
Then select start options tab
Then pick start url and enter the url you require
Solved by adding an ASP.NET Web Application project project to my silverlight solution. Then by going into the properties of my new ASP.NET Web Application project and then going to the Silverlight Applications tab and adding my Silverlight app to this project. Then I choose the TestPage.aspx in solution explorer and then start debugging. It worked!
So the steps:
Add a ASP.NET Web Application project to your Silverlight application solution.
Go into the properties of your new project.
Go to the Silverlight Applications tab.
Add you Silverlight project.
Select the TestPage.aspx and hit Start debug (F5).
That should do it.