.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

User mode name \\.\PhysicalDriveX mapping to kernel mode name \Device\HarddiskX\DRX

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :Windows Application

Hi all,

Using WMI api i got the list of all the Hard disk on my system and for each hard disk i got the Device ID which is of format "\\.\PhysicalDriveX" . This Device ID is i believe User mode name for that Hard disk, i wanted to get corresponding Kernel mode name for that Hard disk which is of format "\Device\HarddiskX\DRX". Is it the case that the value X is same for user and kernel mode ? If i have a Hard disk with Device ID "\\.\PhysicalDrive0", is it true that it corresponding kernel name will be "\Device\Harddisk0\DR0" or can it be something else other then 0 ?


View Complete Post

More Related Resource Links

SQL 2008 R2 clustered instance does not start in single user mode

Hi I am testing the startup of a SQL 2008 R2 clustered instance (Windows 2008 R2) using single user mode but it fails with : Error: 17058, Severity: 16, State: 1. initerrlog: Could not open error log file ''. Operating system error = 3(The system cannot find the path specified.) - I am running the following command from the default sql installation : C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL01\MSSQL\Binn>sqlservr.exe -c -m -s SQL01 - The cluster service on the passive node has been shutdown. - The SQL Server and SQL Agent services have been set to offline in Failover Cluster Manager. Any assistance greatly appreciated. Regards, PK    

Put outer-gridview in non-Edit mode when user edits inner-Gridview

using vb.net/asp.net 2005.(sorry last post I had the grids reversed, what I meant to say is this:I have an outer gridview I'll called "Outer" and an inner-gridview inside that I'll call "inner".There are times when the user will put Outer into edit mode and then put Inner into edit mode and change a value in Inner.  The user is not supposed to be able to do that.So when the user wants to edit Inner I need to change the edit mode of Outer so that Outer is Not editable.   EX: I want to do something like this but not sure in which event of outer to do it:'event fired when user puts inner gridview into edit mode Protected Sub Inner_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles Inner.RowEditing 'put outer gridview into non-edit mode Outer.EditIndex = -1 End Sub Does anyone know how to do this, is this the right event?  Also I assume I have to rebind the gridview?thanks,MC

Parameter value filter based on user in SSRS (SharePoint Integration mode)


Hello..we have a reuirement where we have to filter the parameter value in the drop down based on the user who is accessing the report. We have form and Windows authenication enabled in the SharePoint site (some users will be from inside the network using windows and some will be accessing the site using internet using the Form Authentication).

Please let me know what would be the best way to handle this reuirement? Do we need to create a separate table  and store the User Information along with the parameter values they have access to, pass the userid from Report to db and then fileter the records using this table? OR Can we create a SharePoint List to maintain the user access information and then directly fetch the user information from the list using T-SQL to filter the records?

Please let me know your suggestion...


My user controls stopped working in Design mode! Why?


I have a few user controls that I have been using for months but now whenever I open a page in Blend that uses one of the controls I get an invalid xaml error. The project still compiles and runs and behaves just like it's supposed to but I can't edit xaml in Design view because of this error.


In the page I have

<local:ACAVariableWidth x:Name="CIDCloseButton" HorizontalAlignment="Right" Margin="0,0,17.54,15" VerticalAlignment="Bottom" Width="174" Height="89" MouseLeftButtonDown="callerID_close" Text="Close"/>

The error is: The member "Text" is not recognized or is not accessible

In the user control xaml I have:

		<StackPanel x:Name="TopSP" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" Height="76" d:IsLocked="True">
			<TextBlock x:Name="ACATB" Margin="8,8,8.5,9.5" FontFamily="APHont" FontSize="32" Padding="5,0" Foreground="White" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding ElementName=UserControl, Path=Text}" d:IsLocked="True">
					<DropShadowEffect Direction=&

Disappearing "Exit Edit Mode" and "Welcome User XYZ"


Kind of a mystery problem here. I have been building a couple of Sharepoint sites for our teams. Nothing fancy.

The mystery is that the symptoms are slightly different, depending if one uses a generic public logon, or a discrete user logon.

Generic Logon - "Welcome User XYZ" (located at top right) is gone. Site Actions is completely gone.

Discrete User Logon - "Welcome User XYZ" is visible. "Site Actions" (located upper right, below "welcome") is visible, but when clicked on, page goes to edit mode, but "Exit Edit Mode" is not visible.

Viewing the main page (Default.aspx) gives a different page, depending on whether one is logged on as a generic user or a discrete user.

It is almost as though there are two different versions that are running unsynchronised, depending on the logon.

  • Generic Logon renders Version A.
  • Discrete Logon renders version B.

A month or so ago, I was on some Sharepoint forum hunting some code snippet to make the quick launch have collapsible menus. It recommended going through an evolution of making a copy of "default.master" and renaming one of the copies "olddefault.master" as a back-up and inserting the code there. Tried it. Didn't work. Thought I cut the offending code out but a comparison

Changing to Sinle user mode


My database is in Emergency mode... I'm trying get back to single user .... but it says....  Database state cannot be changed while other users are using the database <DBNAME>

but when check with sp_who.... there is no active processors......

The command i applied is...... sp_dboption 'DBNAME', 'single user', 'true'


Please Help... tks

Kernel-Mode authentication without Kerberos


I have installed a new SharePoint 2010 farm and am using NTLM authentication.  When i try to access CA i am asked to login 3 times. After doing so i have a blank screen.  I have seen many posts here and elsewhere with this same symptom and it looks like it is usually a problem with Kerberos, but i am not using that.

I have determined that if i enable kernel-mode authentication all seems to work. i have tested several times enabling and disabling kernel-mode authentication in IIS and it always works.  If kernel-mode is enabled i can get to CA if kernel-mode is disabled i cannot get to CA.  What is troublesome is i have read a few posts that say that for SharePoint Kernel-mode should be disabled. So my question is, should i have kernel-mode enabled on sharepoint iis web sites when i am not using Kerberos?  And what about this extended protection?

Steven Albrecht
University of Colorado Denver

coming out of single user mode



How to come out of single user mode in sql server


Database Corrupted - Can't get db in single user mode

I have two SQL 2008 R2 databases running on a 64-bit development Machine :
I have created Synonyms in MyDatabase (Table1, Table2, Table3) for three tables in the IMS database.
I am experiencing very poor performance using these Synonyms from my application so I am trying to troubleshoot the problem.
I tried to run "DBCC CHECKDB (IMS,  REPAIR_ALLOW_DATA_LOSS)" by performing the following steps
  1. Used Services to stop the processes (Instance, Agent, Browser, Integration Services 10.0, VSS Writer)
  2. Ran cmd.exe "As Administrator"
  3. cd C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn
  4. ran sqlservr.exe -m -s SQLEXPRESS (output says it started in single user mode)


  1. Ran cmd.exe "As Administrator"
  2. cd C:\Program Files\Microsoft SQL Server\100\Tools\Binn
  3. ran sqlcmd.exe -S D

SQL Server 2000 Database in "single user mode"


Hi all,

I've an old production database server with SQL Server 2000 SP4, that runs from 6 years. Now sometimes I find that the production database goes in "single user mode". Why? My error logs don't help me.

Disable Kernel-Mode for Kerberos. Is this considered a best practice?


It is suggested in the following two posts, by MSFT folks, that for Kerberos to work you have to DISABLE Kernel-Mode.  Is this then considered a "Best Practice"?






Is realtime SQL Server Replicated database usable realtime (not offline / single user mode)


Is SQL Server replicated (destination) database replicated by SQL Server Replication fully usable? Meaning it's not just for Disaster Recovery but is fully usable from various say BI / Reporting purposes.

In the essence it is exactly same as other replication engines and the destination database is very much usable and not just offline / single user mode.



SMO Database in Single User mode issues


I am trying to use the SMO library and setting the single user mode. Here is a simple example illustrating my issue.

The below code will fail the first time. Saying "Invalid object name TestTable". Eventhough that table does exist and so does the DB. However, if you run it again (now the DB is already in single user mode) everything works fine. Also, if you remove the code that alters the db user mode everything works fine. I am assuming the problem must exist with the single user mode and utilizing the correct db connection. I have tried flipping the AutoDisconnectMode and NonPooledConnection but that hasn't help. Any help would be appreciated.

Sample code

SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder(); 

sb.Password = "P@ssword!"; 

sb.UserID = "testuser"; 

sb.DataSource = @".\mssql2008"; 

sb.InitialCatalog = "TestDB"; 

ServerConnection serverConn = new ServerConnection(); 

//serverConn.AutoDisconnectMode = AutoDisconnectMode.NoAutoDisconnect; 


Unattended Install leads to Single User Mode and Access Denied


Hi everyone,

I'm trying to install SQL 2008R2 (full) with an answerfile.. in my answerfile I have specified a local group that should be SQLAdministrators.. in the log I see that the group is validated

2011-04-07 23:06:27 Slp: Sco: Attempting to get sid for user account ZEW-V-913BC072\SSPSQLAdmins
2011-04-07 23:06:27 Slp: Sco: GetSidForAccount normalized accountName ZEW-V-913BC072\SSPSQLAdmins parameter to SSPSQLAdmins
2011-04-07 23:06:27 AS: Data: SID = S-1-5-21-2763175129-1897282573-4278807499-1019
2011-04-07 23:06:27 AS: Result: Success
2011-04-07 23:06:27 AS: Result: Valid

The only thing i see in the log is:

2011-04-07 23:43:59 Slp: Message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding..
2011-04-07 23:43:59 Slp: Inner exception:
2011-04-07 23:43:59 Slp:  Exception: System.Data.SqlClient.SqlException.
2011-04-07 23:43:59 Slp:  Source: .Net SqlClient Data Provider.
2011-04-07 23:43:59 Slp:  Message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding..
2011-04-07 23:43:59 Slp: Error: Action "SqlEngineDBStartConfigAction_install_configrc_Cpu64" failed during execution.

I also noticed that it takes at least two connections before th

Automatic Batch Printing in ReportViewer Remote Mode


Please help me, i have a properly working codes that is capable of the following:

1. Printing of Reports from ReportViewer without using the build-in print ICON in the actual ReportViewer. to view the working for the printing alone please click here.

2. Batch Printing by making a loop and placing a checkbox on the gridview where the needed paramerter (DataKeyNames ID) is retrieved then pass to the ReportViewer

This is my Code

foreach (GridViewRow row in GridView1.Rows)
            CheckBox chk = (CheckBox)row.FindControl("CheckBox2");
            if (chk.Checked)
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://TestServer/ReportServer");
                ReportViewer1.ServerReport.ReportPath = @"/Tavern/StudPaymentReport";
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                ReportParameter[] rptParams = new ReportParameter[1];

                rptParams[0] = new ReportParameter("ClientID", GridView1.DataKeys[row.RowIndex].Value.ToString());

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