Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8486063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:50:02+00:00 2026-06-10T20:50:02+00:00

I have an ASP.NET 4 app that I have in a virtual directory in

  • 0

I have an ASP.NET 4 app that I have in a virtual directory in my SharePoint site. This is a self contained app in its own app pool so I don’t think SP is the problem but? The aspx page works fine, but a request to the ApiController returns 401 Error: Access is Deniend.

<html><head><title>Error</title></head><body>Error: Access is Denied.</body></html>

Event Viewer has nothing and IIS log shows 401 2 2148074254 then 401 1 0 then 200 0 0 then 401 1 2148074248. I Know that last 401.1 looks like my mistake, but I have confirmed many times it is the Last log entry for a request. Consistant in IE8, Chrome, FireFox.

Fiddler shows only 401s, “WWW-Authenticate: NTLM” alternating with “WWW-Authenticate: NTLM TlRMblah_blah_blah…” and the HTML above.

Backup plan is to ditch the controller and use a .ashx, but hopefully SO can help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:50:03+00:00Added an answer on June 10, 2026 at 8:50 pm

    Found a work-around until the project is no longer in SharePoint. Kept the Controler class (PSSController) as-is, but added an ashx file with the below code and changed the javascript to use it. cntrl is just my class; your QueryString and Post params will be different. A bit hacky but it works 🙂

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.SessionState;
    using Newtonsoft.Json;
    
    namespace PipWebApp
    {
        public partial class PSSurvey2API : IHttpHandler, IRequiresSessionState
        {
            public void ProcessRequest(HttpContext context)
            {
                String InputString = null;
                using (var sr = new System.IO.StreamReader(context.Request.InputStream))
                    InputString = sr.ReadToEnd();
                List<PSSurvey.cntrl> cntrls = (List<PSSurvey.cntrl>)JsonConvert.DeserializeObject(InputString, typeof(List<PSSurvey.cntrl>));
                String Params = context.Request.QueryString["Params"];
    
    
            Controllers.PSSController APICon = new Controllers.PSSController();
    
            if (context.Request.QueryString["Rpt"] == null)
                context.Response.Write(JsonConvert.SerializeObject(APICon.Post(cntrls, Params)));
            else
                context.Response.Write(JsonConvert.SerializeObject(APICon.Post(cntrls, context.Request.QueryString["Rpt"], Params)));
        }
    
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual
I have a SQL query in my ASP.net web app that looks like this:
I have an ASP.NET app that sits on our intranet, using the WindowsIdentity to
I have an asp.net app that uses System.IO.Path.GetTempFileName() for temporary files. In the production
I have an ASP.NET Login App that creates a cookie called 'ASP_LOGIN77' and gives
So, I have an asp.net mvc app that is being worked on by multiple
I have a asp.net web forms app that uses System.Web.Caching.Cache to cache xml data
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
I have an ASP.NET 4 Web Forms app that is using URL Routing. I
I have an asp.net MVC App that I want to deploy to IIS 5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.