How To Authenticate Clients to printing From Server Using ASP.NET C#


hello
i have one server in which the printer is installed, the clients are printing from server. So, i want to authenticate those clients before printing using asp.net?

means if in server client architecture of any company,
clients are printing from any type of application like
word, power point, excel or even from web browser,

i want to stop them to printing unlimited prints,

one asp.net application is currently running, clients logins are also available in it, so using those login i want to give rights for printing.

i am talking about system printing from any application and authenticate them using asp.net application.

if it's possible?

can anyone give me idea or code for print authentication from client computer to server?

You can restrict access to that specific print page as follows in your web.config file :

<configuration>
<system.web>
<authentication mode="Forms" />
</system.web>
<location path="printPage.aspx">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

this will prevent all the anonymous users from accessing the page and will allow only the authenticated users to display it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.