I am having issue with Https when i host my site on https i got warning "Contains unauthenitcated contents".
And site is not looks like that it has been host on https secure server. whole site look normal while on same domain few pages don't have such problem they working fine.
When i cheched it i found that the page where i have asp.net validation control causing problem once i remove it page start working fine.
I have a folder within my website called 'ProtectedPages' which contains pages which users can only see if they have logged in (MyAccount.aspx etc). If they bookmark that page and try to go to it without logging-in, they are immediately bounced to my login page.However, if I have text files, images etc. in there, then it seems users can get to these fine without the need to login - all they need is the URL. For example, I could send the URL http://mysite.com/ProtectedPages/MyAccount.aspx to a friend and he wouldn't be able to access it until he had logged in. However, I could send himttp://mysite.com/ProtectedPages/ATextDocument.txt and it would show it to him without any problems.How would I go about protecting ALL files within this folder? I have a web.config file within the ProtectedPages folder which just has this information in it (I don't want TrainingAdministrator's to have access to that folder at all)
public class Authenticate : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { if (!filterContext.HttpContext.User.Identity.IsAuthenticated) { filterContext.HttpContext.Response.Redirect("/"); } } }
I was wondering if it is possible to make it redirect to the view for action="Login" controller="AdminLogin"? And how do I pass some message to the login view that tells "you need to login to access that" or similar?
I am adapting a script I used for copying a CD on a local machine to work on a website. It works only if the CD to copy is physically in the server. This is not ideal as I would like the CD for copying to be in the client CD. So what would be an effective way to have the app point to the client CD drive instead of the server CD drive?
When I run my website through debug mode in visual studio everything looks great and all the images on the page show up fine. But once I deploy my website to an IIS7 web server (doubt that other versions would make any difference, but you never know) then users can't see the images on the site until they log in.The website is an asp.net MVC site and I'm new to MVC, though I do have lots of experience with asp.net forms. It seems that only authenticated users are allowed to access the images folder, and there is an authorization section in my web.config saying that only admins can access the site, so how do I make it so that all users, authenticated or otherwise can view the images?
I am trying to hide the content of the folders on my website. I can redirect the anonymous user to the login page, when he try to access to prohibit individual pages, but when the user is regiestered in the website, he can see the folders' content. For example:
he types in the address www.mydomain.coma/account/ and he can see all the pages there: shoping.aspx, shoping.aspx.cs,
I have an issue with loginUrl parameter on Forms authentication. Forms Authentication always redirect unauthenticated users to ~/Account/Login ignoring the url configured into Web.Config.
This happend if i add reference to WebMatrix.WebData,WebMatrix.Data into main web.config file (system.web/compilation/assemblies). N.B.: Moving this reference to child web.config file (the one contained into View folder) error doesn't occour anymore
At first I got an error that the user did not have permission to read the config file (web.config). So I gave NETWORK SERVICE and IIS_IUSRS read on the website folders.
But now vistors can not access images and other static content from the Content folder without logging in. Aspx and .ashx content works however static content is redirected to the login page.
How can we prevent non ahuthenticated users from like and dislike multiple times?one way : save Ip address in a cookiebut theres's two problem1. I heard Ip address isn't unique and changes frequently2. cookie can be deleted by userI'd .
I am using the membership provider and am reasonably comfortable that all of my web pages are safe.Some of the pages contain hyperlinks to documents (pdf, xls, etc.) stored in a folder under the root of the web site. I have disabled the ability of users to anonymously list folder contents, but I don't see a way to keep anonymous users from accessing the documents if they know the specific URL for that document. Example; if the document contains a spreadsheet of current sales, I don't want an ex-employee (who captured the URL while working here) to be able to bring up the current document.asswording the documents isn't a good choice because there are hundreds and we'd like to avoid changing them all every time someone leaves, or weekly, or whenever...Is there a way to restrict access to all contents of a web folder to people who have been authenticated?
In my web site I have a admin login page to edit the contents. Is it necessary that the default page has to be the login page..............Because in web.config file , under Authentication of Forms am using loginurl="MyLoginPage.aspx"......So is it compulsory that the Default.aspx =MyLoginPage.aspx.i mean to ask i should not change the name of default page or what?
i want to get the contents of a textbox and set them to a asp label for output, we can cause a postback to if that makes it easier, so far i did this and it comes up trumps
I have decorated my base controller with a couple of action filters. They work fine.
One of those filters sets up the request - does things like set the culture based on the domain, etc.
I also have a handful of actions that require authorization using the Authorize attribute.
My problem is that when an user attempts to request a page they are not authorized to access, the authorization filter kicks in and redirects them to a page telling them that they cannot vie the page.
The issue is that the action filters never run so the culture and other request data is never set. This effectively causes language to be wrong in the view and other data to be missing.
I know that authorization filters run first but my question is this: How can I design this such that I can ensure that certain methods are always run before the view is returned, regardless of the authorization.
Now I have lot of introductions and images and I would like to store these in different pages and when on the menu I click on specific link it load in the same page the contents of the relative page, Introduction into id#intro and images into id#images. I don't know how to do that.
I've got a Master Page with multiple ContentPlaceHolders. One of them will sometimes be empty. If they both have content, I'd like to make visible a buffer so there is some space between them, but this should remain hidden otherwise.My question is, how can I determine from the C# code-behind of my Master Page whether the ContentPlaceHolder of a child page has any content assigned to it?
I have a masterpage. And i got 2 pages. Anyhow one is displaying all the contents. Other doesn't. Even though I can do everything in source It really drives me crazy not to see what i'm doing. Website is working as a charm. Everything is cool except development environment of single page.
I want to add a site map to my website however I am a little unsure as to its contents.
Basically I have a simple site with only 5 pages, the site uses a navigation bar which is generated from a master page and is therefore visible on every page.
This means every page is navigatable from very page. In addition some pages also link to the other pages through key words in the text.
I am Creating a small webapplication. I want to create some contents in silveright. I want to embed xap in aspx page. I have created table. I want those contents in table.
I want to use FCK editor in my C# asp.net 2.0 website. I had downloaded FCK editor FCKeditor.Net_2.6.3 and added the FredCK.FCKeditorV2.dll to my application and had dowloaded FCKeditor_2.6.6 and added the folder (fckeditor) and contents to my application, now I could add the editor control in my Default.aspx page and is working.My question is that on entering some text and images in the editor how can I save the contents so that on the next time when I open the saved contents could be shown in the editor, there is a save button but it seems to be no effect.
im developing a website for my university.There are certain pages in the website that needs to be edited dynamically by the admin once he logs in. how to do this? i know this might be a very silly question but im just a beginner.