473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Manually authorize user

Is there any way, from an asp.net page to find out if a user is allowed
to view some random path based upon their credentials? Obviously this
gets done automatically in the UrlAuthorizationModule, but I have a
need to check an authorization from a page. Yeah, it's a bit weird, but
is it doable?

Basically, what I want is something like:

bool IsUserAllowedAccess(path, user)

Thanks,

Brian

Jul 27 '06 #1
2 1656
Hello Brian,

I'm not sure I understand the requirement of not using the
UrlAuthorizationModule. Couldn't you put the following code in your page to
determine if the current user has access to the resource in the virtual path
parameter using the built-in UrlAuthorizationModule class?

if (UrlAuthorizationModule.CheckUrlAccessForPrincipal ("~/BlogIt.aspx", User,
"get"))
{
Label1.Text = "You may blog";
}
--
brians
http://www.limbertech.com
"Brian Vallelunga" wrote:
Is there any way, from an asp.net page to find out if a user is allowed
to view some random path based upon their credentials? Obviously this
gets done automatically in the UrlAuthorizationModule, but I have a
need to check an authorization from a page. Yeah, it's a bit weird, but
is it doable?

Basically, what I want is something like:

bool IsUserAllowedAccess(path, user)

Thanks,

Brian

Jul 27 '06 #2
You understood the requirements just fine. The
CheckUrlAccessForPrincipal was exactly what I needed. I just didn't
know it existed. That solved my problem perfectly. Thanks!

Brian

brians wrote:
Hello Brian,

I'm not sure I understand the requirement of not using the
UrlAuthorizationModule. Couldn't you put the following code in your page to
determine if the current user has access to the resource in the virtual path
parameter using the built-in UrlAuthorizationModule class?

if (UrlAuthorizationModule.CheckUrlAccessForPrincipal ("~/BlogIt.aspx", User,
"get"))
{
Label1.Text = "You may blog";
}
--
brians
http://www.limbertech.com
"Brian Vallelunga" wrote:
Is there any way, from an asp.net page to find out if a user is allowed
to view some random path based upon their credentials? Obviously this
gets done automatically in the UrlAuthorizationModule, but I have a
need to check an authorization from a page. Yeah, it's a bit weird, but
is it doable?

Basically, what I want is something like:

bool IsUserAllowedAccess(path, user)

Thanks,

Brian
Jul 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
1
by: GluedToTheScreen | last post by:
I have a small PHP ecommerce site set up using Authorize.net's SIM (simple) interface. Working fine, but... I'd like to implement their AIM interface (so visitor's will never see the gateway's...
1
by: machodev | last post by:
Hello Friends, Getting a bit fuzzy on the Authorize.net and the Curl Integration. I have the script using the for the authorize.net Integration with the curl command exec("/usr/local/bin -m...
3
by: Blue | last post by:
I'm using Authorize.net as my payment gateway and as of approx 7pm PST on 12/26/05, no payments have gone through from my website. (However, I can still process payments through the Auth net...
0
by: Nixon | last post by:
Hi there, in my application i have the need to protect certain urls, urls that the user first must make a payment to view or invoke, e.g urls for downloading video clips. If a user hasnt paid i...
1
by: jesmi | last post by:
i created my test account in authorize.net. but it didn't provide me the username and password. i want to use authorize.net by using my test account.so anybody please help me. thanks in advance
4
by: Adrienne Boswell | last post by:
Does anyone know if it is possible to do recurring billing to Authorize.net using ASP Classic. I have no problem doing one time transactions. -- Adrienne Boswell at Home Arbpen Web Site Design...
2
by: singh.udaybir | last post by:
What are the Steps to make Shopping Cart From Test Account to Live Account . in which files changes are to be made and what changes. Authorize.net + OsCommererce using
1
by: vanitha05 | last post by:
hi everyone, In my application I am trying to get the response from authorize .net ,if i am using HTTP web response i am able to the response from site like approved or failed etc but if i mention...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.