I've developed Asp .net MVC3 application.i'm using jquery ajax call for loading parial view.Its working fine when i execute the solution on my local machine.when i deploy the same solution using IIS Partial view not getting loaded.I coudn't find what'll be the issue.Can anyone suggest me some solution on this?
Related
Right now we have a Asp.Net web form application which is hosted in IIS.
How can I add my angular-5 script files inside the existing Application in IIS?
And if so, How my angular routing will work?
NOTE: Here I don't want to host my Angular project separately inside the IIS.
Let me know in case the question is not understandable fully. I can give the example.
Thanks in advance.
I know it might be a bit late, but I recently faced a similar problem, and I wanted to share it in case anyone else stumbles with the same problem. Even if it would have be preferable to host it in some other way, we needed to integrate a new Angular application with an existing WebForms one.
To give the control of the router to angular, declare the next function in Global.asax
Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.MapPageRoute("MyRouteName", "MyAppPath/{*path}", "~/MyAppAspx.aspx")
routes.MapPageRoute("MyRouteName2", "MyAppPath2/{*path}", "~/MyAppAspx2.aspx")
'And so on
End Sub
This will make webforms redirect all requests to "myhost/MyAppPath/" to the provided aspx, so that angular can take care of the routing.
Then you must just create the required aspx and provide there the needed scripts in the order they appear in the generated index.html.
I've spent several hours of googling. Can anybody point me to an example of big file uploader with progress with backend on ASP.Net MVC3. I found many different solutions, but most of them use PHP as backend, and it's a bit hard for me to convert. Also I think there have to be some examples for ASP.Net MVC3.
PS I don't consider paid components, please don't suggest them.
Uploadify - there you have it :)
Set maxRequestLength in the web.config
http://midnightprogrammer.net/post/Upload-Files-In-RAZOR-With-jQuery-Uploadify-Plugin.aspx
You could try out Telerik Upload not sure what the file size limit is though.
This is a free and opensource component from Telerik.
I spent a good amount of time getting the right plugin too.
I use this :
http://valums.com/ajax-upload/
Uploadify uses flash to send files, which was bad for me as i needed upload from authenticated users ONLY. And flash would not send the cookies and so your application will treat the upload request as anonymous. If that is not an issue, uploadify works fine too.
Here is how i implemented it in mvc3 -
Create a controller / action to receive the opload file.
Change the 'action' property of the plugin to point to it -
// url of the server-side upload script, should be on the same domain
action: '/controller/action'
Make sure that action returns JSON object with a property in it with 'success' = 'true'/'false'
I have this ASP.NET MVC 3 application that works fine when developing locally using IIs Express 7.5 or Cassini.
But when i deploy the app to a real web site on IIs 7.5 (even on my local dev box) I get the dreaded
The view 'Index' or its master was not found or no view engine supports
the searched locations.
The following
locations were searched:
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
I have tried the following:
In global.asax.cs, added these lines in the Application_Start() method to force it to use the Razor view engine only:
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
But to no avail.
I find this error message somewhat difficult to troubleshoot. Can someone give me some pointers on what to look for?
Ok, my bad.
A classic example of shooting first then ask. (Or the other way around...)
The Home/Index.cshtml file had its Build Actions set to None for some reason. Setting it to Content solved the problem.
I want to run a few AJAX applications on my laptop, but not sure how to do it using IIS. Does anyone know?
You really dont even require IIS server setup to run your own AJAX application.
You can take a look at few of the tutorials onlike which talk about creating your own application using HTML.
Tutorial - http://www.dynamicajax.com/fr/AJAX_Hello_World-.html
This way you can load HTML pages using AJAX.
Once deployed parts of my web-application stop working. Index-es on each controller do work, and one form posting via Ajax, Login works too. Other then that yields 404. I understand that nothing particular should be done in integrated mode.
I don't know how to proceed with troubleshooting.
Some info:
App is using default app pool set to integrated mode.
WebApp is done in net framework 3.5.
I use default routing model.
OS is Windows Server 2008.
IIS 7
Any help is appreciated. Thx.
EDIT:
I determined that only actions that accept ID parameter don't work. On the contrary, when I add dummy id method in Home controller of default MVC app it works.
EDIT 2:
I found the problem. Links on few pages of the site didn't use ActionLink helper. It was harder to see because of the Ajax invoking. So, never hardcode links to the actions on the site, even temporary.
Please go through this link for details on deploying MVC application with IIS 7 integrated mode.
http://www.asp.net/mvc/tutorials/older-versions/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs