Is there a way to change the name of the Default.aspx to any name chosen, using the Microsoft.AspNet.FriendlyUrls?
For Instance, I would like to change the page Default.aspx to Home or maybe just change it to this ~/
I am using Visual Studio 2019 Framework 4.6 with MVC, can it be possible?
Thanks
Al
Related
I have an asp mvc 4.5 web application. I'm using vs community 2017 version 15.8.6. I need to add an aspx webform page in order to use Microsoft.Reporting.WebForms.ReportViewer control as a way to intagrate SSRS reports in the web application. I've followed some tutorials to achieve this integration, installed from nuget these references:
:
Created an aspx page with Master page and added the ReportViewer control. All looked fine, but when I attemped to build, I got this strange error:
The error is in the aspx.cs file. When I comment out the call to the control everything is fine, but I can't set the creds of the report. Here's the code:
t1.ServerReport.ReportServerCredentials = new ReportServerCredentials("userName", "password", "domain");
t1.ProcessingMode = ProcessingMode.Remote;
It is very clear that the ReportViewer control exists, when during run time the Watch 1 window display it:
Did anyone had something like this before? Ive treid restarting my local iis as described here, I've closed and open VS, restart the computer, nothing helps.
Thanks you
EDIT
I've simply create a new form. for some reason it is always refreshing, but at list it builds!
Thank you all.
I have a working MVC 5 web application. everything was ok until suddenlly i found out that i cannot add a view to the application and the add button is disabled.
I use VS 2015 Entrprise update 3 RC.
C# as a programming language.
the project type GUIDS tag looks like this
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
please help me with this.
Thanks all
Your ProjectTypeGuids look ok. You can view a list of ProjectTypeGuids here.
I have Visual Studio 2015 Community Edition here and it works fine when I try to add a View clicking on Views folder and an Action inside a Controller.
There are some similar questions here at stackoverflow, maybe they can help you:
Cannot add view to ASP.NET MVC 5 project
Visual Studio 2013 button to add a View is disabled
Can you give more information about how you are trying da add that View please?
Some tests
I can reproduce clicking on the Views folder and the add button is disabled if I choose Template: Empty and don't select any Model Class:
The only way the button Add will be enabled with no Model Class selected is if I choose Empty (Without Model):
Make sure you have all the following installed:
Modifying VS -> workloads -> installation details
In a Siteocre project I want to compile all cshtml files using the MvcBuildViews setting. Unfortunately this also compiles any ascx and aspx files. I get an error like :
32>/temp/Sitecore/admin/Wizard/InstallationLog.ascx(1): error
ASPPARSE: The base class includes the field 'logPanel', but its type
(System.Web.UI.HtmlControls.HtmlGenericControl) is not compatible with
the type of control (System.Web.UI.HtmlControls.HtmlIframe).
Is there a way to restrict the view compilation to cshtml only?
I will transform my comment into an answer.
Your approach to have Sitecore inside your Visual Studio folder is not correct.
You need to separate your Visual Studio and website folder where IIS is mapping your site.
On next link is explained very well how to create a Visual Studio Project for Sitecore MVC .
http://sitecore-community.github.io/docs/sitecore-mvc/creating-project/
Hello everyone We have searched this error beforehand, but nothing seemed to be our case, since all of the problems that were mentioned were because of using EF Code first, that we are not using it.
After migrating to MVC5, we ran into a problem. Whenever we want to add a view to our controller, we get the following error:
there was an error running the selected code generator value cannot be null
BTW, we are using LINQ to SQL,and we are not scaffolding the view.
We have left the Template Empty(Without model), and we are not using layout page.
Our project is using ASPX view engine. We had no problem in VS 2012. After migrating to VS 2015 we are running into this problem.
Has ASPX view engine been removed from VS 2015. Could it be the problem?
Any kind of help would be highly appreciated.
If Prompt for
there was an error running the selected code generator values does
not fall selected range in visual studio
web.config has been deleted or renamed.
Please check your web.config file. Might be there were any additional tag would be added.
You can do this by doing the below method
All I had to do is install Web Essentials 2015.1 , restarted Visual Studio, repeated the Add View action, and it worked, don't have an explanation to this, but it worked.
I recently updated my VS2010 website project from .NET 3.5 to 4.0. Everything was working fine in the website project. Today I decided to migrate the website to a web application project as I have learned this is the best way to work in .NET. I split out all my class files into a separate class library and copied all my other content into my new project. Then I updated all the references and web.config.
When I build the class library, everything works great.
The problem is happening when I try to build/debug the web application project. It is acting like all the controls are missing and it is also throwing a bunch of compile errors about the public properties I have in my master pages.
Control errors:
"The name 'INSERT CONTROL NAME HERE' does not exist in the current context"
Master page errors:
'System.Web.UI.MasterPage' does not contain a definition....
It is giving these errors for every single control and master page property in my entire solution.
I notice when I add a new web.form to this project, it also adds a filename.aspx.designer.cs file in addition to the .aspx and .aspx.cs file. My existing files do not have these extra files since they were created in a different .NET version.
Anyone have an idea on how to overcome these issues?
UPDATE: It seems I was missing the step where I need to right click on the new application folder and select "Convert to web application". I just did that and it seems to be a little bit better...
Now it is choking on Literals that are inside single quotes:
<div class='<asp:Literal ID="CssClassLiteral" runat="server"></asp:Literal>'>
It doesn't see this literal when it does the conversion... Is the above valid code or should I implement that functionality another way?
Yes - one of the main differences between the website project and a web application project in Visual Studio is that the web application project defines a designer.cs file for every page/user control.
So, let's say you have a page in a website with a codebehind:
Default.aspx
Default.aspx.cs
In a web application, the designer is now required:
Default.aspx
Default.aspx.designer.cs
Default.aspx.cs
The designer file is auto-generated, but you may need to "touch" each page to generate.