I have a razor page in my application, accessed once I logged myself in the application via another razor page being the root of the application :
#page "test"
<div >
<h3>This is a test</h3>
<iframe src="./test.html" frameborder="0" id="test"></iframe>
</div>
The html file being just :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h3>test </h3>
</body>
</html>```
It correctly displays the test.html when I launch my blazor application in debug or release mode in visual studio.
But once I launch it after I published it, the iframe display the base page of the application, it's like the application inside the application, no idea why it is happening and the test.html is not displayed at all.
So basically the login page is displayed inside the iframe...
Any ideas how it is happening?
ImageI am setting up my web application (working) in the Windows Server 2016 Environment which has the IIS role set up. My application outputs the following error when I try to run it: "The page you are requesting cannot be served because of the extension configuration" error.
I have a simple application that has a label and needs to change the text of label on Page Load. My .aspx files work if I don't mention the CodeBehind file .aspx.cs file .
I believe this is a case of .aspx.cs file access. I have a much bigger application and I made this small one for asking this question. My guess is that I cannot access my .aspx.cs file.
I have tried adding "allow fileExtensions=".cs" ....." and this add cs to the list of allowed files. I have also tried using the aspnet_regiis -i to install asp.net which worked correctly.
As for my setup, I have added the IIS role, installed the ASP.NET 4.5 and its Extensible feature and also ASP.
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Intro.aspx.cs" Inherits="Intro" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
<asp:Label . ...../>
</body>
</html>
UPDATE :Thank you all for your responses. This stackoverflow community is great . As for the solution I enabled .NET 3.5 features , .net 4.5 features, and all features related to a Web Server . A more concrete answer would help but this worked for me. Thank you all .
Web.config
I have added the CSS in the _Layout but it is not loading the CSS or any Javascript Files
I have folder structure like this
Assets/Css/admin/... so on
In my MVC4 razor layout I am loading the css like this rather using Bundles
<link rel="stylesheet" href="#Url.Content("~/Assets/css/admin/module.admin.stylesheet-complete.min.css")" />
but its not loading the css according to this pattern. I used the same in MVC3 razor layout and it worked.
After loading clicking the url generated in rendered form in browser it shows
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>IIS 8.0 Detailed Error - 500.0 - Internal Server Error</title>
Contents of my Css File
#import '../../../Assets/components/common/forms/editors/wysihtml5/Assets/lib/css/bootstrap-wysihtml5-0.0.2.css';
What seems to be the problem with MVC4 ?
Please guide
Thanx all I have figured it out. I have changed the project setting to Annonymous Authentication to Enabled and Windows Authentication to Disabled. The problem is solved by doing this. Thank you for your efforts
I added FriendlyUrls package via NuGet to my asp.net web pages project.
When I debug the solution it returns error that ASP.ViewSwitcher in ViewSwitcher.ascx could not load.
I did not find anything on the internet about this issue.
Could anybody please help me, how to fix this?
change
<%# Master Language="C#" AutoEventWireup="true"
CodeBehind="Site.Mobile.master.cs" Inherits="ASP.Site_Mobile" %>
to
<%# Master Language="C#" AutoEventWireup="true"
CodeFile="Site.Mobile.master.cs" Inherits="ASP.Site_Mobile" %>
(Edit)
That is the case if you are working on a website as oppose to a web application.
I faced the same problem. Thanks to user3260977. I'm going to elaborate what he told.
Once you have installed FriendlyUrls package, there will be a file called Site.Mobile.Master. Double click and open it. Change CodeBehind="Default.aspx.cs" to CodeFile="Default.aspx.cs". Now open the file ViewSwitcher.ascx and change CodeBehind="ViewSwitcher.ascx.cs" to CodeFile="ViewSwitcher.ascx.cs".
Basically change every file where there is CodeBehind to CodeFile.
try importing the namespace
<%# Import Namespace="Microsoft.AspNet.FriendlyUrls" %>
I'm getting a bunch of these errors for my image buttons, link buttons, text boxes, and labels. These errors are in my .aspx code. Why am I getting so many?
<%# Page Language="C#" AutoEventWireup="true" CodeFile="frmSearchPersonnel.aspx.cs" Inherits="frmSearchPersonnel" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div align="center">
</div>
</div>
<asp:Label ID="Label1" runat="server" Text="Search for employee by last name"></asp:Label>
<asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox>
<p>
<asp:Button ID="btnSearch" runat="server" PostBackUrl="~/frmViewPersonnel.aspx"
Text="Search" onclick="btnSearch_Click" />
</p>
</form>
</body>
</html>.
The errors are under Label, TextBox & Button above in blue. The errors state:
Validation (): Element 'xxxx' is not supported.
The only problem I & my Resharper see is the period after the ending html tag.
</html>.
What are the errors you are getting?
Edit:
Here's a simple fix someone had:
http://weblogs.asp.net/alaaalnajjar/archive/2010/08/31/how-to-fix-quot-validation-element-xxxx-is-not-supported-quot-visual-studio-2010.aspx
the idea is to remove the folder "ReflectedSchemas" from paths:
Win XP : C:\Documents and Settings{username}\Application
Data\Microsoft\VisualStudio\10.0\ReflectedSchemas
Win Vista / 7: C:\Users\AppData\Roaming
\Microsoft\VisualStudio\10.0\ReflectedSchemas
Note: make sure that "Show hidden files, folders, and drives" is
selected from Folder Options,also don't forget to close VS before
deleting the folder.
This solution should work for VS2010 and VS2008,at VS2008 you have to
delete ReflectedSchemas from folder 9.0 not 10.0.
This issue has been reported before. I found an article with steps to resolve:
Close down Visual Studio 2008 (or Visual Studio 2010).
Go to Control Panel -> Appearances and Personalization -> Folder Options -> then select the View tab. Now make sure "Show hidden
files, folders, and drives" is selected and click OK.
Now browse to the following folder: Computer -> OS (C:) -> Users -> {username} -> AppData -> Roaming -> Microsoft -> VisualStudio -> 9.0 folder. Note: in Visual Studio 2010 would be 10.0 folder.
Now delete the "ReflectedSchemes" folder. This should fix "Validation (): Element '' is not supported" error for ASP.NET server
controls within Visual Studio 2008.
After reopening your Visual Studio 2008 project, you should now have intellisense working correctly for ASP.NET server controls.
See here for more details:
http://www.gotknowhow.com/articles/fix-validation-element-not-supported-visual-studio-2010
add this in your page.
<!DOCTYPE html>
<html lang="en">
istead of
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
In hopes of helping someone else from a google search like mine:
Visual Studio 2013 - I did the same as suggested by the others deleting the "ReflectedSchemes" folders to no avail.
Finally, I deleted <html xmlns="http://www.w3.org/1999/xhtml"> - then replaced it and the problem suddenly went away. Come to think of it, seems like I've done this before too.
FWIW....
Noticed I had to delete the contents of ReflectedSchemas in:
%AppData%\Roaming\Microsoft\VisualStudio\9.0\ReflectedSchemas\
and
%AppData%\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas\
also followed the reset VS2010 settings:
https://msdn.microsoft.com/en-us/library/ms247075(v=VS.100).aspx
to get it to clear the problem.
For those that deleting of "ReflectedSchemas" folder has not worked - do following
Close Visual Studio
Try again to delete (Windows 7 paths):
C:\Users\DefaultAppPool\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\Classic .NET AppPool\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\Classic .NET AppPool\AppData\Local\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\[your_nt_name]\AppData\Local\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\[your_nt_name]\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
For me above has not worked, so I simply copied whole folder
Users[your_nt_name]\AppData\Roaming\Microsoft\VisualStudio
from another machine where these problems did not occur. After this all ASP.net IntelliSence problems were gone.
I'm keeping compressed backup of VistualStudio folder in case this happens again.
Change the target validation to "HTML 5" and click OK, Element is an HTML 5 supported validation so it can not supported in XHTML1.0
Refer Below Screenshot Set Vadation to HTML5