I am trying to set an auth cookie in OnAuthorization of my custom attribute in asp.net mvc(C#) application.
when the session expires(New Session), i am setting an auth cookie again to make it available until the users logout.
I have used the following to set the auth cookie,
//set forms auth cookie
FormsAuthentication.SetAuthCookie(s...
Hi
Service layers and repository seem so simple on paper but I am getting myself confused.
So here is what I am confused about. I have a service layer for my PayPal service layer with validation logic relating to my PayPal stuff and methods that connect to my paypal repository and return results (and do more logic if needed).
Now on m...
Hi,
I need to use Form-Based authentication on an ASP.NET MVC web site with LDAP (Active Directory) backend like TeamCity for instance.
So i need to query LDAP first if the requested user is valid, then auto-register user in database according to LDAP user authentication infos in order to use mixed authentication :
Users :
Admin (loc...
Can anyone give me a succinct definition of the role of ModelState in Asp.net MVC (or a link to one). In particular I need to know in what situations it is necessary or desirable to call ModelState.Clear().
Can anyone give me a succinct definition of the role of ModelState in Asp.net MVC (or a link to one). In particular I need to kno...
I am working on a MVC web form where user will submit the Album information in the first step, after submitting the Album information in the second step user can submit the track information data.But i am little confused how i ll do in MVC , in normal webform it is easy for me to do .I am looking for some sloution for this.
...
I've come up against a problem in converting my Fluent NH mapping to Sharp Architecture. I like the platform for it's ease, however it seems to handle entity mappings slightly differently to pure Fluent NH.
I have a Entity 'Category' that is a simple tree structure. I have to override the auto-mapping as there is a M:M property that I ...
I am suddenly getting a Windows Security dialog when requesting:
http://mydomain/Reports/
This happens after I have moved an ASP.NET MVC application from Server 2008 to Server 2008 R2.
This page (like others) are access controlled using Windows Form authentication. The other pages work correctly, just this page is giving me hassle...
I'm trying to add validation to our redirects to prevent us allowing redirections out of the domain. The urls I need to pass aren't trusted since they could come from the user via the url so I'm wondering what's a good way to parse the url to figure out the host?
I knocked up an initial implementation using Uri.Parse but that doesn't l...
Is there a simple example of OpenID authentication implemented using MVC ?
...
How submit list View in ASP.NET MVC. List View dont have
input type="submit" value="Save"
and I dont know where to put it.
Problematic code is:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcZezanje.Models.student1>>" %>
<asp:Content ID="Content...
On my site, a broken link throws the default, page not found error. In the web.config I have turned on CustomErrors and forward 404 errors to a custom message.
On my dev box it works, on the host it does not.
Any ideas? ASP.NET MVC 1.0, SQL 2005, IIS 6 host (ya, I wish it was IIS7 - but they want to charge me to move the site).
Thanks...
I just finished watching Stefan Schackow's PDC 2009 session and he mentioned that he is surprised that people are still using Session State in ASP.NET. Session State is even used internally in ASP.NET MVC.
Having worked with a legacy application where everything is put into a "in-proc" session (even datatables!), I've seen session abuse...
I'm trying to use async from the asp.net mvc futures, using my own async delegate. Haven't figured out how to make it work. Here's the code:
public delegate String GetString();
public String getHello() { return "Hello"; }
public IAsyncResult BeginHello(AsyncCallback cb, Object state)
{
GetString dlgt = getHello;...
Hello.
I'm trying to access my /stats page and am hosted with godaddy.com with an ASP.NET MVC website. I keep getting prompted "Authentication Required" but this is something in my web.config causing me to get the prompt. Example message:
A username and password are being requested by http://domain.com. The site says: "domain.com"
I...
Hi
I am wondering how do I first detect if Javascript is enabled/disabled. Disabling javascript on this site revealed that stackoverflow uses something called the tag.
Is this like the standard way of doing it? Does it work on all the browsers?Which browser versions does it not work on(ie IE6)?.
Do I just stick in the body or the hea...
Currently im trying to write a upload page on asp.net mvc...
basically my concept is to ready the request send by user and in the same time, upload it to the new server using sftp...
is there any way to read the user upload data at the same time user uploading it to the server in asp.net mvc?
Thank you very much
...
We are creating a large secure back office web application in ASP.NET. All access to the site is over https connections, and we'd like to either turn off caching for pages or set caches to expire quickly.
However, the site uses quite a few images and largish javascript files/libraries. Is there a way to selectively cache certain fil...
Hai guys,
Any one knows what are the server requirements to host an asp.net mvc application....
...
I have multiple forms on a page which pass an id to the controller via hidden inputs. As I am using strongly typed views for these I think I need to keep the Id for each of these to be the same. It works currently though I think it's bad practice. How should I handle this? In Django there are form prefix values is there an equivalent?
h...
I know that Microsoft and MvcContrib have made great attempts at enabled developers to unit test controllers. But lately I've been wondering if we should ditch unit testing controllers, and leave them for integration testing. I have two reasons for this:
A good controller should not have any logic in it, or very basic minimal logic. ...