Dear all,
I have to use the report viewer control within a MVC 3 application and have problems to realize this by using a webforms page. Each time I call my reports via a report list view
I have got an error that the resource cannot be found. I know that this is caused by a wrong route mapping which must be set in the global asax file. How should I define the route to solve this issue?
Here is the virtual path of my report list view:
http://servername/reports/
After selecting a report it should be possible to call the report webforms page via a link
(the virtual path looks like this: http://servername/reports/reportname).
Can anyone help me?
Thanx in advance.
Try adding the following ignore routes to your route definitions:
routes.IgnoreRoute("reports");
routes.IgnoreRoute("reports/{*pathInfo}");
Related
When a WCF/REST or JSON service is created in Visual Studio with helpEnabled="true" in the web config, there will be a URL similar to "https://Server/Service/ServiceREST.svc/help". IIS will present a help page - see enclosed example.
I'm looking to modify this page, I want to exclude some lines.
Does anyone know how, or if that is possible?
According to your description, I would like to tell you that the help page of WCF WebHttp endpoint cannot be modified, and in fact there is no property or configuration to control it. You can replace it with your own custom page, but this requires writing a lot of code according to your needs. You can read about the schemas used in the WCF Web HTTP Services help page through this document.
I am viewing my deployed report at report server.
Suppose I have Embedded Code based on the link below.
http://msdn.microsoft.com/en-us/library/ms155798(SQL.90).aspx
As this report are view form a web application
do the statement System.Windows.Forms.MessageBox.Show(“..”)
Work?
Will it cause error?
This is not a VBScript question. The embedded code is VB. I suggest you remove that tag. That said, message box modals will not work in web applications and yes the code will error.
Thre's a number of post on StackOverflow as well as other sites around this topic. I was however having hard time finding anything related to MVC3 and it's specific resource keys.
In order to globally localize generic MVC messages one should:
Create a resource file under App_GlobalResources folder
set DefaultModelBinder.ResourceClassKey to the resource name (without .resx)
Create localized copies of MvcResources.resx under that folder and resource name
I've tested this and according to MSDN, if I set the ResourceClassKey to something non existent it should throw exception. It doesn't happen so I must be doing something wrong.
If anyone has got this working under MVC3 and Razor, here's the questions:
where to find the correct MvcResources.resx for MVC3? I was only able to find one for version 2
Where should one set the DefaultModelBinder.ResourceClassKey property? Would that be under Global.asax -> Application_Start or for each request?
Any ideas greatly appreciated.
where to find the correct MvcResources.resx for MVC
http://aspnetwebstack.codeplex.com/SourceControl/latest
I have a C#.Net web app and the pathing is different from my local box to the dev box. My local url is http://localhost:<port>/Proposal/Edit. However, on the dev server, it is http://{MydevServer}/dev/app/Proposal/Edit]. So, this causes issues with the Style Sheet and navigation links, etc. I know I can grab the ApplicationPath inside all the Controllers and set a variable whic the pathed elements can use. But that seems like too much work for this issue. Any ideas on how to solve this? Is it possible to get the ApplicaionPath in the _Layout.cshhml file? Is ther a better idea?
You can call Href("~/") in any Razor page to get the full client path to your application root.
you should be using the Url.Action and Url.Content helper methods for generating your links and src attributes. then you'll never need to worry about it.
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