.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

iis 7 IP Security using System.DirectoryServices : Unable to update

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :.NET Framework

I used the below code to Set  IP Security from my vb.net Application.  It is working in IIS 6 (windows xp, and server 2003).

facing error in IIS 7.5 (windows7).

' Get the IIS object that holds the info for the default site.


Dim SecObj As Object = GetObject("IIS://LocalHost/W3SVC/1/Root/WebServerSCM")


' Get the IIsIPSecurity object.

View Complete Post

More Related Resource Links

When attempting to install Security Update Microsoft for the Microsoft 2007 Office system updates (u

When attempting to install "Security Update Microsoft for the Microsoft 2007 Office system updates (updates KB2277947 and KB982331)" the sintallation fails and then I recieve the error "The detection failed, this can be due to a corrupted installation database". System Info: XP Home Edition Version 2002 Service Pack 3 Intel Atom CPU N270 @ 1.60 GHz I am running XP and have installed and run the "Fit It" tool, to no avail. I even tried downloading each update individually, from the Microsoft site, instead of through the automatic update. I also read this same question posted by another user (link: http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/cfa66cd3-2aa2-44ee-9393-ffae41d4f70c/) only to find his info contained no answer either. How do I fix this so that I can get these updates installed?

System.Windows.Forms.WebBrowser unable to update or change


I am using this WebBrowser component in a C# project.

I have declared and use "_wb" as shown below::

string httpcmd = @"https://...........";

System.Windows.Forms.WebBrowser _wb = new System.Windows.Forms.WebBrowser();                
_wb.ScriptErrorsSuppressed = false;                
Uri myuri = new Uri(httpcmd);
_wb.Url = myuri;
while (_wb.ReadyState != System.Windows.Forms.WebBrowserReadyState.Complete)


The above code in within a class.

Once my program uses the above code once, it then does seem possible to change.

i.e. After the first iteration, nothing changes each time the code is run.

The DocumentText property I reference stays the same once it is set.

It is like the URI is not even re-sent.

Only if I close the application and then re-run then the webbroweser will update as desired.

I have seen many references to this problem but have not been able to resolved it.

Can anyone suggest how to get this componet to reset or clear so it behaves like I have re-run the application?


Active Directory bulk data update error System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIf



we are trying to update bulk data into Active Directory from some database table. If we run for say 40000 users, it fails in between While updating its failing with an exception that. The server is not operational.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
   at System.DirectoryServices.DirectorySearcher.FindOne()

Below is the piece of code updating the records ...


While drDataReader.Read()
                strMailID = drDataReader.Item(("EMAILID")).ToString()
                strAttributeName = drDataReader.Item("ATTRIBUTENAME").ToString().Trim()
                strAttributeValue = drDataReader.Item("ATTRIBUTEVALUE").ToString().Trim()



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of typ

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

System.DirectoryServices NOT available


I have simply copied a page from a VS2005 project to a VS2010 project, and it will not work.

NO code-behind, just a simple Page_Load function in the .aspx page.

and okay, since this editor complete f's up a cut and paste from VS, I will type it all out....wonderful!


<script runat="server">

protected void Page_Load(object sender, EvnetArgs e)


   System.DirectoryServices.DirectoryEntry ...



This is really all you need to see.

The System.DirectoryServices is not available in intellisense and gives an error if I try to run this.

I have added the reference to my VS project - no go.

I have added a reference as an @Import at the top of the page - no go.

All other System classes appear to be available, but not DirectoryServices, so anyone know the secret handshake to get this to work in VS 2010?

Windows Server 2003: Discover Improved System Info, New Kernel, Debugging, Security, and UI APIs


There's a lot to say about Windows Server 2003. First of all, it's the first operating system with built-in .NET Framework support, and it's the first 64-bit OS from Microsoft. But wait, there's more! There are lots of new features and APIs in this version as well. For instance, Windows Server 2003 features Hot Add Memory and a number of other arcane new tidbits. There are new APIs for handling threads, directories, and files, and new features like the low fragmentation heap for managing memory and system information. There's vectored exception handling and new UI APIs as well.OS internals expert Matt Pietrek takes a look at the additions he finds most interesting and useful so you'll have a good place to start when you dive into Windows Server 2003.

Matt Pietrek

MSDN Magazine June 2003

Unable to cast object of type 'System.Web.Mvc.ValueProviderResult' to type 'System.IConvertible'


 Why am I getting this error on line:

               sp.Price = Convert.ToDecimal(collection.GetValue("Price"));

sp is :
  SPecials_Templates sp = new SPecials_Templates();

SPecials_Templates Defined:

    public partial class SPecials_Templates
        public class SPecials_TemplatesMetaData

            public object Key { get; set; }
            public object Template_Name { get; set; }
            public object Headline { get; set; }

unable to attach database, security setting?


Hi folks,

I am using VS 2010 Professional with SQL Server 2008 Developer.  I right click on the App_Data folder in solution explorer and add an existing item, then navigate to the correct database.  However, I receive a pop up that Access is Denied.  How do I fix this? 

System.IO.IOException: Unable to read data from the transport connection

Hello,   I have an xml webservice calling another xml web service and occasionally i get the following error - any ideas why?Does this happen when the request is made or when reading the response? Also how i can prevent it from happening? Thanks   System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   --- End of inner exception stack trace ---   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean readToUserBuffer)   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)   at System.Xml.XmlTextReaderImpl.ReadData()   at System.Xml.XmlTextReaderImpl.InitTextReaderInput(String baseUriStr, TextReader input)   at System.Xml.XmlTextReaderImpl..ctor(String url, TextReader input, XmlNameTable nt)   at System.Xml.XmlTextReader..ctor(TextReader input)   at System.Web.Services.Protocols.SoapHttpClientProtocol.GetReaderForMessage(SoapClientMessage message, I

System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlCli

I have created a windows library control that accesses a local sql database I tried the following strings for connecting Dim connectionString As String = "Data Source=localhost\SQLEXPRESS;Initial Catalog=TimeSheet;Trusted_Connection = true" Dim connectionString As String = "Data Source=localhost\SQLEXPRESS;Initial Catalog=TimeSheet;Integrated Security=SSPI"   I am not running the webpage in a virtual directory but in C:\Inetpub\wwwroot\usercontrol and I have a simple index.html that tries to read from an sql db but throws the error System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)   at System.Security.PermissionSet.Demand()   at System.Data.Common.DbConnectionOptions.DemandPermission()   at System.Data.SqlClient.SqlConnection.PermissionDemand()   at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, etc etc  The action that failed was:DemandThe type of the first permission that failed was:System.Data.SqlClient.SqlClientPermissionThe Zone of the assembly that fa

SMO System.Security.SecurityException

Hello everybody I wrote a backup procedure using smo. this procedure works great on my dev box, but once deployed to the hosting company's web server it throws above exception ("System.Security.SecurityException: That assembly does not allow partially trusted callers.") I did some research on the subject and it seems that hosting companies give you only medium trust in the config file and hence cannot access smo. My hosting admin is a great fellow (www.alsonetworks.com, recommended!) and is willing to help out, so he told me that he: A. installed smo 2008 in the GAC B. added them to the medium.config file Even so, I still receive the error. Now, I'm pretty sure he'd do anything possible to get it to work (sans giving full trust) but i'd got to tell him what to do. So can anybody advise any additional steps that can be done to get this to work? my site is built with vb asp.net 3.5 against mssql 2008, but the hosting site uses mssql 2005. I appreciate your help and advice PS. I've also read a lot about AllowPartiallyTrustedCallers, but I understand that it is irrelevant here as i have not written the assembly. it would be something ms could/should do. is that correct?   heres the code : Public Shared Sub Backup() Dim sqlCon = New SqlConnection(ConfigurationManager.ConnectionStrings("Main").ConnectionString) Dim conn As New Server

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Er

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.   I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".   I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.   The machine runs Windows Vista Business. SQL has SP 2 loaded.   What causes this?

unable to create new table in sql server 2000 enterprise manager on windows7(Operating system)

i have successfuly installed sql server 2000 on windows7 and i am able to browse all the tables and edit aswell(on enterprise manager) but i have a problem while creating new tables it says ' MMC has detected an error in a snap-in' and provides options to either continue with the error or send a report to microsoft ,   Please help regarding this compatibility issue   Thanks in advance !

Encryption (System.Security.Cryptography) .Net 2.0

Hi, Query regarding cryptography.  I'm using .net cryptography to encrypt and decrypt files stored on disk on an asp.net website using .Net 2.0 framework.   The code (copied below) works fine to encrypt and decrypt pdf, tif, jpg, etc.  However when it comes to MS Word documents with embedded images and/or tables I get a "Bad data" error when decrypting.   The same document saved to rtf format is encrypted and decrypted without error.  Also simple formatted text documents in Word format (Office 2003) do not throw an error when being decrypted. Would someone care to point out where I'm going wrong? Thanks, code below   _________________________________    Public Sub Encrypt(ByVal Userid As Integer, ByVal FilePath As String)        'Encrypt the file        Try            Dim EncryptedFilePath As String = FilePath & "enc"            Dim clsNetEnCrypt As New NetEncrypt(User)            clsNetEnCrypt.Encrypt(FilePath, EncryptedFilePath)            'Remove the Unencrypted file  

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object canno

hello,i am using a web servicewrtitten in .net and i access the webservice from my wepApplication i get this error System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object cannot be cast from DBNull to other types.my code is access webservice: protected void btnSave_Click(object sender, EventArgs e)        {            int intStatusCode;            dtProjectStatus = (DataTable)ViewState["dtProjectStatus"];            try            {                objService.Credentials = System.Net.CredentialCache.DefaultCredentials;                if(dtProjectStatus.Rows.Count>0)                {                  intStatusCode = objService.InsertTest(dtProjectStatus);                }   

how to Update a row with Current system date and add a Prefix to it

Hi Could you please help me out, How to write an update Query to update the row with the current system date and I need to add a prefix like "ABC_" The Column is in VARCHAR datatype. I need it like  ABC_System date update Table1 set column1= getdate() updates the row when i add prefix,it throws Syntax error converting datetime from character string.   Thanks in advance Shan
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