.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

deny unauthorized users with an alert message

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net

 Hello i am using Asp.net ,vb. I want to deny users who have not logged in with a message" you have to login to access this page".
Can someone help me write the code in vb.net?
Thanks in advance

View Complete Post

More Related Resource Links

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

Hide documents from being access by unauthorized users.


Hi experts,

I would like to know how to hide certain documents (eg. Word, Excel, PPT, PDF) in a document libraries from unauthorized users? I tried implement Target Audience, but it doesn't work. If anyone know, i really appreciate for the guidance.

p/s: If my posting is not relevnt to the thread, please kindly move it to the appropriate places. Thanks!

How to stop unauthorized users from sending documents to a Records Center site?


I can't find a way to stop unauthorized users from sending documents to a Records Center site. Can someone please help me? Do i need to configure anything to restrict it to the members of the web submitters group?

I'm still using MOSS2007


The impossibility of doing things depends on your will to do it.

No results for users that are members of a 'Deny All' policy for web application

I have a SharePoint Farm with search working happily.  This farm also has a remote access component that I have configured on a separate extended web application.  The business has some accounts that it does not want to allow access to the Intranet remotely, and has added these accounts to a 'Non Remote Intranet Users' security group.  I then set up a rule on the Extranet zone to Deny All access for this group.  The Default zone still allows them to browse however, which is working great. The only problem is that members of this group do not get any search results whatsoever.  From the logs it appears that all results get security trimmed.  :( Can I disable security trimming somehow?  Is this a bug?  Any suggestions would be appreciated.  :)

SSRS - Message/Alert

Dear Colleagues,   I want to find out, is there a way to prompt a message to user when datediff("ss",Now,ExecutionStartTime) > x number of seconds?   For example, report is having 5 parameters with multiselect property enabled and user had selected all values from all parameters. Report starts processing on clicking ViewReport button and then message has to poped to user asking to reduce the parameter values such that report could process within allowed number of seconds.   Is this possible in SSRS 2008 R2 version or Is there any .config setting for the same?              

Lotus Notes users get "Authentication Required" when viewing an alert email with a graphic

(This is a SharePoint 2007 question, but I only see SharePoint 2010 in the Forum options...kind of odd since SharePoint 2010 has not been released.)If our users open email alerts in Lotus Notes, and the email has an image, they are presented with a prompt for credentials that says:"Authentication RequiredEnter your username for Unkown at sharepoint.ourcompany.comUsername________________________Password________________________[ ] Save these in an Account in my address book[OK][Cancel]"Emails without graphics do not prompt for credentials.Does anybody know why this happens, or how we can fix it?

Redirect Unauthorized Users


I've decorated a Controller action with:


When a user who's not in that role attempts to invoke that action, they get redirected to the Login page even though they're already logged in.  How do I redirect an unauthorized user to a different page to inform them that they do not have the proper access level?

Deny users to some web pages



i have a website having a couple of pages, i'd like to allow all users to be able to browse some pages and deny them some web pages. I know it's something to do with creating an authorization tag and adding some allow or deny user, but i have no idea how to implement it.

Please help

Alert Message and AJAX


I'm totally new to AJAX.  I would like to show a message box to a user if they are trying to submit a form and a required texbox has no data in it.  Any help or links for this issue would be appreciated.



How to get this on every alert, complete message on success or failure


I have just been learning to set up alerts on dbs. On my test server 2005 I am gettting this in my email after the CheckDb

Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.4035
Report was generated on "RNOFS_T_SQL".
Maintenance Plan: CheckDB
Duration: 00:17:53
Status: Succeeded.
Check Database Integrity (RNOFS_T_SQL)
Check Database integrity on Local server connection
Databases: AdventureWorks,LogosTestDB
Include indexes
Task start: 2010-10-21T02:00:03.
Task end: 2010-10-21T02:17:54.

Clean Up History (RNOFS_T_SQL)
Cleanup history on Local server connection
History type: Job,Maintenance Plan
Age: Older than 1 Weeks
Task start: 2010-10-21T02:17:54.
Task end: 2010-10-21T02:17:55.

Notify Operator Task (RNOFS_T_SQL)
Notify Operator on Local server connection
Operator: CH\bagchis,Messer, Pat
Task start: 2010-10-21T02:17:55.
Task end: 2010-10-21T02:17:55.


Now on my production db I am only getting the message I typed in "CheckDB finished on RNOFSSQL". The only difference is

Alert Me not working for AD group users



I have an AD Group. I have added this AD group to the permission level for list and the site that contain the list. These people were awarded the rights I set for the group and they are able to access the site and list. They are able to edit and change list as they have contribute rights. Only thing missing is the notification, when these people set an Alert me on the list, they receive the email stating their registration for the notification. Though, when they go and change the content of the list they receive no email notification. What is weird is that when I add users manually to SharePoint group all works fine. I have many users in my AD group. I would prefer to use my AD group. I have checked that AD group security list is email enabled and that exchange server does allow reception to everyone.  The Ad group list is working as I can send an email to all people within the Ad group. I looked at the log there were no related errors to the notification. I know that registration emails are handled, differently than alert emails as alert emails are handled by the timer job I checked if the timer job is ok too. 

Any way to avoid alert error message of AsyncFileUpload?


I think the popup message is a poor idea because OnClientUploadError has already provided developers a good option to handle the error easily in whichever way they prefer.  The worst is that if a user clicks OK, he will see a window that should be seen only by software developers.

Is there any trick to stop the error alert?

how to use javascript message("alert) in System.Web.IHttpHandler


hello every one i using system web handler when System.Web.IHttpHandler

           save the record than how can show message "Record is saved"

SharePoint 2007 alert me sent out mail with wrong message


I have created a document library, and this doc library has set alert me. On this doc library, there is field name Category, this is a multiple check box with value like A, B, C, D.

I uploaded a document Test.doc as sample with Category D, then the new added item alert email was sent out. And problem came out, in the alert email body, the item Text.doc with wrong Category A instead of D.

I tried another two items again with Category B and C, but all these items with wrong Category A in the alert email body.

Can any body give help on this? Thank you so much!

Throws an error message while adding users to the Active Directory


Hello guys,

I am trying to add a user to active directory but for some reason its failing


Here is the error message

Message: HandlingInstanceID: dde791c2-7df4-4214-85c4-72b045510def

An exception of type 'System.Runtime.InteropServices.COMException' occurred and was caught.


05/04/2011 15:18:30

Type : System.Runtime.InteropServices.COMException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

Message : The server is not operational.

Source : System.DirectoryServices

Help link :

ErrorCode : -2147016646

Data : System.Collections.ListDictionaryInternal

TargetSite : Void Bind(Boolean)

Stack Trace : at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)

at System.DirectoryServices.DirectoryEntry.Bind()

at System.DirectoryServices.DirectoryEntry.get_IsContainer()

at System.DirectoryServices.DirectoryEntries.CheckIsContainer()

at System.DirectoryServices.DirectoryEntries.Add(String name, String schemaClassName)



How to get List of Users subscribed for Alert Me particular document library in MOSS2007 Teamsite &


I want to get list of users getting alerts for a particular document library. I know option of Site Actions -> Site Settings -> User Alerts under “Site Administration”. to know where particular user is having alerts in site. In my environment i have around 100 document librarys how to know users getting alerts for a particular library??  


Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages
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