.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

"403 forbidden" Error in my Custom login page

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
Hi All,   I Created a custom login page using Sharepoint Application page which is cofigured with FBA using this article http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx. But I keep getting the "403 forbidden" error. Can anyone suggest me a solution. Thank you.

View Complete Post

More Related Resource Links

"403 forbidden" Error in my Custom login page, cant find problem

I Created a custom login page using Sharepoint Application page which is cofigured with FBA.  but every time redirect to http://testsp.max-perf.com/_layouts/DataQ.Extranet/test.aspx?ReturnUrl=%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F .  I have  Win2008 (not r2) and sp2010. Thank you.

access denied error in custom login page using custom membership provider/ roleprovider in the FBA u



I have deployed my custommebrship assembly and role provider assembly in the sts web config , central admin web config  and current web appln web config 's. i have created a  dll which has  login control and in the sign_authenticate event i am creating the securitytoken.

when i establish a session using the security token created using the iissettings object, and  while tryibng to redirect to the   home page of the/landing page of the web appln am Getting access denied error. 

signInControl_Authenticate(object sender, AuthenticateEventArgs e)




e.Authenticated = true; //till this line  it worked success.

 base.RedirectToSuccessUrl(); //here it throws  :" Eror: access  denied "     current ly signed in user : myname sign is as   diuff. user


anybody knows how to overcome this , means authentication is  success, but authoriation didnt work.

 how can i get asuccessfull login to theweb appln/ siteccollection? in my role provder class i  have created my own roles

for user name: myname

role name:  Administrators, Contributor.

any help is appreciated





Pass exception details to custom error page.

Hi All, I created a custom error page and update using webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, CustomErrorPage). Its working fine and my custom error page is show if error is occurred. OR We redirect using SPUtility.RedirectToErrorPage("my message"); But I am not able to find my exception details at my custom error page. Is there any way to pass the exception details and other custom information to custom error page?  

custom 401/login failure error messages

I have a req to display a custom error message when a user fails to log in 3 times.  The default behavior seem to be for a redirect to something like this http://server/_layouts/AccessDenied.aspx?loginasanotheruser=true&Source=http%3A%2F%2Fserver2k7%2FPages%2FDefault%2Easpx after the third login attempt.  The resulting page just comes up as blank...I'm guessing because it failed auth.  My initial thoughts were to create a custom error page, and redirect with an http module.  That solution (while it does redirect) puts me right back to the initial problem of just a blank page being displayed after the failed auth.  I've been struggling with this for a while now, ANY thoughts or advice would be greaty appreciated.  Is it even possible? 

Custom error page

Hi all,I'm having VS 2008 professional. I want to generate a custom error page in my website. I added simple .htm file and wrote in it whatever i wanted it to display. Then I went to ASP.net configuration > Application > Define default error page and then selected my .htm file & saved it. After that if i tried to view my website in browser, it is not showing me the error page which i created instead it is showing the server error page which VS generally shows if there is some error in the code. Plz help to sort outSmitha

Null reference message Custom Error page

how come a Null session value that is called, doesn't get directed to the Custom Error Page?

Forms Based Authentication - problem with custom master page and login page



I have successfully enabled and set up FBA (Forms Based Authentication) on my SharePoint 2010 Foundation server. The thing is that I need to customize the look and feel of the login page. I have successfully customized the page (and master page) to look the way I want, however, when I try to log in, I get the following error/message on the page:
"Forms Based Authentication on classic Web applications has been deprecated".

What I've done:
Made copies of /_layouts/simple.master and /_layouts/login.aspx and renamed the copies. The markup in the master page is MUCH simpler than the original, but I've kept all the ContentPlaceholders that I don't use (most of them) in a hidden <asp:Panel at the bottom of the page.

I've changed the web.config file:
<authentication mode="Forms">
      <forms loginUrl="/_layouts/loginCustom.aspx" />

So, I'm not getting any errors on the page until I try to log in. When I use the default settings (login.aspx and simple.master) it works just fine (but damn that page looks ugly!).

Does anyone know what I might be missing?

Update: I believe the reason it doesn't work is because my custom login aspx is not part of the Claims Based Web Application (because it's sitting

Displaying custom error page


For certain parts of the site the allow inserting and updating of data we have some try / catch logic in place..

Now we would like to display a custom error page explaining what didnt happen. Instead of just a generic message that says error occurred.

Here is 1 error that is generated due to Primary Key constraints, we woudl like to redirect them to our error.aspx page which is already setup and configured in the web.config but within that page display a more user friendly detail message of why they got the error. In the example below, we may want to say, "There was an error with the "Access Insert" please make sure that the values you entered on the previous page are unique" thats just an example, but gives an idea of what we are trying to do.



Server Error in '/' Application.

Access Point Insert Error:Violation of PRIMARY KEY constraint 'PK_AccessInfo'. Cannot insert duplicate key in object 'dbo.AccessInfo'.
The statement has been terminated. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Exce

The page cannot be displayed error when creating new item in custom list


Hi i am workign with a cutom list and every time i try to add a new item and hit ok i get the error shown below. Sometimes it happens and other times it doesnt and it only happens with a select few. One way of getting around this error is to not edit it on the page on which it is on but to go to view all content then to the custom list.

I have tried observing whether there was an issue with the pages being checked in and checked out but all pages were checked in and published. I tried deleting and recreating the custom list and no luck. Your feedback would be much appreciated! Thanks in advanced

btw i am a user with full control and our site is being hosted.

The page cannot be displayed


creating custom error page


Hi ..

I have two errors in my application i want to display a custom  defferent error page for each error...

Here is my code

protected void Button1_Click(object sender, EventArgs e)
            int a = 10;
            int b = 0;
            int c = a / b;
      // FIRST ERROR

    protected void Button2_Click(object sender, EventArgs e)

            string str = "hjdfgjh";
            int vv = Convert.ToInt32(str);
        //SECOND ERROR

i have configured web.config like b

Custom Login Page , with custom membership provider for sharepoint 2010


Dear All,

I am new to sharepoint, i am developing a custom application on sharepoint 2010. i need to create a custom login page in sharepoint 2010 with a custom membership provider which will authenticate against a 3rd party web service. 

Can anybody guide me with the steps i need to do for this. do i need to write a custom claims provider for this or is it enough if i write a custom authentication provider and use it for my login page which we do for asp.net.

i am confused about these. 

thanks in advanace 


Need help with a custom error page that shows the error message details


I know how to alter the web config to redirect to an errors page but what I need to do is have the actual offending error message print to that page. This is a special request for testing reasons, I realize the whole point of a custom error page is to provide a user friendly message when an error occurs but for testing we want to show the user the message so they can copy and paste it into a ticketing system we are using for beta testing feedback.

Should I use the global.asax instead? I am pretty new to vb.net and am not sure how to get the actual error message to display on my custom error page. Any guidance would be greatly appreciated.


Custom Error Page question


I create my own customize error page. The code fragement for catch the eroor as following:

HttpCompileException _ccExp = null;
string _expType = "RunTime Error...";
Exception _lastError = Server.GetLastError();

// Get the Stack Frame
if (_lastError is HttpUnhandledException && _lastError.InnerException != null) _lastError = _lastError.InnerException;
//StackTrace stack = new StackTrace(_lastError.GetBaseException(), true);
StackTrace stack = new StackTrace(_lastError, true);
for (int i = 0; i < stack.FrameCount; i++)
	if (!String.IsNullOrEmpty(stack.GetFrame(i).GetFileName())) {
		_frame = stack.GetFrame(i);
if (_frame == null) _frame = stack.GetFrame(0);

// Get file name
string _fileName = _frame.GetFileName();

I try get the .aspx file in the last line, "string _fileName = _frame.GetFileName();".
Why I got a url-formed file name such as "http://server/Work/SomeOne.aspx", sometimes,
and other time, I got a physical path such as "D:\websites\MySite\wwwroot\Work\SomeOne.aspx" ?


404 Page Not Found Error When Trying to Create a Site From a Custom Site Template


I just moved a site collection from a one server to another, and now I can't make copies of my sites using custom site templates.

The details of my site structure are in the next paragraph, in case they are relevant.
On the original server, I created custom templates for my sites, and checked the Include Content checkbox
when creating the templates. Everything works perfectly on that server. When I moved the whole site collection to another
server using stsadm backup/restore everything was there, including my customized web parts. But now I can't create new sites
from templates - and I'm I'm not trying to use templates created on the original server. I'm creating new templates on the new
server. It successfully creates the templates, but when I try to create a new site from one of those templates, I get a
"HTTP 404 Page Not Found" page. It succeeds in creating the new site, and the new site shows up in my navigation bar,
but when I click on the new site, I get a "404 Page Not Found" page.

On the original server, I created one top level site for my whole department. Under that, I have one subsite for each of our
external clients. Under each of those, I have one subsite for each project for that client. I used a Team site as my starting
point at each of the 3 leve

how to create custom login page in SPS 2010



i  want to create a cutom login page in SPS 2010. when i created a classlibrray and mycustomloin.aspx page , which derives from

IdentityModelSignInPageBase instead of layoutspage class. i  have deployed teh dll in GAC and refereered in the aspx page



@ Page

Showing Custom Error Page using asp.net mvc


Hello Friends,

I am showing Custom Error in my page.. if somehting happend wrong. but if the same error occured in my subview master page I am not able to show the Custom error page on Entire page its showing me that Error page under subview master page. Please I am attching the Screen shot.

Update Error in Custom Page



I'm trying to update a record in gridview layout in Student Guardian table.  I'm running into the error below:  "Failed to set one or more properties on type StudentGuardian. Operation is not valid due to current state of the object."


[LinqDataSourceValidationException: Failed to set one or more properties on type GRIPS.StudentGuardian.  Operation is not valid due to the current state of the object.]


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend