从一个页面删除NTLM? C# ?我们可以为IIS中的一个页面设置单独的身份验证吗? [英] Remove NTLM from one page ? C# ? Can we set seperate authentication for one page in IIS?

查看:92
本文介绍了从一个页面删除NTLM? C# ?我们可以为IIS中的一个页面设置单独的身份验证吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个包含10个以上页面的网站。这里有一页可以进行某种数据提取并创建pdf文件。这应该是每天午夜发生的。

我有在一页的pageload中编写代码(比如job.aspx)所以当我运行这个页面时,这个过程就会发生(即创建pdf)。

所以我在我的Windows调度程序中安排了一个工作来运行这个url(因此它将创建pdf)但问题是,当调度程序按作业打开此页面时,它将要求凭据,因为它在IIS中进行了NTLM身份验证。



所以我不希望这个页面检查身份验证,(其他页面应该这样做)



??

I have created a website which contains more than 10 pages.Here one page will do some kind of extraction of data and create pdf files.This should happen on daily basis at midnight.
I have written the code in pageload of one page (say job.aspx) so when i run this page this process will happen(ie creating pdf).
So i scheduled one job in my windows scheduler to run this url(So that it will create pdf) But the problem here is when the scheduler open this page by job it will ask for credentials since its a NTLM authentication in IIS.

So i don't want this page to check for authentication, (other pages should do)

??

推荐答案

在web配置文件中添加对页面的匿名访问,如下所示

add anonymous access to your page in web config file like below
<configuration>


    <location path="job.aspx">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>
</configuration>






将这项工作放入ASPX页面似乎不合适。如果是我,我将从您的ASP.Net页面获取代码,将其放入命令行应用程序,然后将任务调度程序设置为运行命令行应用程序。



但是那说......



DamithSL是正确的,你允许所有用户使用web配置中的位置和授权元素访问页面。



但您可能需要查看IIS中授权部分中的身份提供程序,并为您的项目启用匿名访问和模拟。
Hi,

Putting this job into an ASPX page doesn't seem appropriate. If it was me I'd take the code from your ASP.Net page, put it into a command line application and then set the task scheduler to run the command line application instead.

But that said...

DamithSL is correct that you allow all users to access a page using the location and authorization elements in the web config.

But you probably need to look at the identity providers in the Authorisation section in IIS and enable anonymous access and impersonation for your project.


这篇关于从一个页面删除NTLM? C# ?我们可以为IIS中的一个页面设置单独的身份验证吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆