.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

Consistency validation for SQL Server registry keys

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Sql Server

I cannot get past this support rule when I attempt to install SQL Server 2008 RC0.  When I attempt to drill into the failure the popup states "The SQL Server registry keys from a prior installation cannot be modified.  To continue, see SQL Server Setup documentation about how to fix registry keys."


First off, why would the SQL Server 2008 RC0 install attempt to modify registry keys from a prior installation if I am attempting to install it side-by-side with a prior install of SQL Server 2005 Developer Edition?  


Second, can anyone point me to the SQL Server Setup documentation that walks me through how to go about fixing these registry keys?


Any help would be greatly appreciated.  Thanks in advance for your help.


Wendell G


View Complete Post

More Related Resource Links

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

How to use server side validation to ensure image field is not null


I'm having trouble accomplishing the above. Below is all the mark up and code. I'm not getting error messages, but the validate image function is not working (fileupload portion is working ok).

In my attempt below---not sure if it's the simplest or best validation approach anyway---the "UserId" parameter appears during rendering to be empty---but in most methods I have it successfully containing or referring to the logged-in user's identification.

Following is the control that refers to the image field (page = advertisement.aspx):

<asp:Image ID="Image" runat="server" ImageUrl ='<%#Eval("UserId","Image.aspx?UserId={0}") %>'


Following is the successful code behind for the page image.aspx referred to above (page = image.aspx.vb):

Partial Public Class Image

    Inherits System.Web.UI.Page

    Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Request.QueryString("UserId") IsNot Nothing Then

            ' Get the connection string from Web.config.

            Using conn As New Sq

Server-side validation on an Entity Framework required field (property) does not work!

Has anyone had issues getting server-side validation on an Entity Framework required field (property) to work? The data type is a string (nvarchar). Server-side validation for required fields of other data types WORK fine. Only string fields have issues. I get the following error on UpdateModel(obj); of my POST method within the controller. Exception Details: System.Data.ConstraintException: This property cannot be set to a  null value.Source Error: Line 4500:                OnTextChanging(value);Line 4501:                ReportPropertyChanging("Text");Line 4502:                _Text = StructuralObject.SetValidValue(value, false);Line 4503:                ReportPropertyChanged("Text");Line 4504:                OnTextChanged(); I've even tried data annotations like this but it seems to get ignored.     [MetadataType(typeof(ObjMD))]     public partial class Obj     {    

SQL Server + ASP.NET Security Validation + HTML Markup Security

Hey everyone!I have an application, that for example, the customer gives me their Address. I store it in my database using the below code:        Dim connectionString As String = ConfigurationManager.ConnectionStrings("DMBConnstring").ConnectionString         Dim insertSql As String = "INSERT INTO BasicUserProfile(UserGuid, Firstname, Lastname, Nickname, Address1, City, State, Zip, DOB, Gender, SeekingGender, Sexuality, SeekingSexuality, HaveKids, WantKids, BodyType, SeekingBodyType, Ethnicity, SeekingEthnicity, Religion, SeekingReligion, Smoking, SeekingSmoking, Education, SeekingEducation, Relationship, SeekingRelationship) " _         & "VALUES (@UserGuid, @Firstname, @Lastname, @Nickname, @Address1, @City, @State, @Zip, @DOB, @Gender, @SeekingGender, @Sexuality, @SeekingSexuality, @HaveKids, @WantKids, @BodyType, @SeekingBodyType, @Ethnicity, @SeekingEthnicity, @Religion, @SeekingReligion, @Smoking, @SeekingSmoking, @Education, @SeekingEducation, @Relationship, @SeekingRelationship)"         Dim connectionString As String = ConfigurationManager.ConnectionStrings("myconnstring").ConnectionString        Dim insertSql As String = "INSERT INTO BasicUserProfile(UserGuid, Firstname, Lastname, Nickname, A

What registry keys are responsible for file extension association?

I'm trying to associate file extension to start some type of files with my application. Which registry keys I have to modify to be sure, that when user double click at file it opens with my application. And how get delete/modify permisions to key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<extension>\UserChoice"? This key created after setting default program by "Open with" dialog. I've tried: string ext=".eee"; RegistryKey r = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"+ext); RegistryPermission f = new RegistryPermission(RegistryPermissionAccess.Write, r.Name); f.Assert(); r.OpenSubKey("UserChoice", true); //at this step "Requested registry access is not allowed." exception occured

SSRS2005: Is it safe to manually remove instances from the Keys table in the report server database?

I have a problem with redundant reporting services instances still hanging around in the initialization pane of the RS configuration wizard and I can't get rid of them. The problem arose when we had new webfarms and before I had removed all references to the old ones from the initialization screen, the old webfarms had been switched off, removed from the network and dismantled. Therefore when I try to 'de-initialize' them, I get an error stating that reporting services cannot connect to them and when I run reports, a fair few are trying to run on the old webfarms which no longer exist and are disappearing into the void. There's a table in the report server database called Keys whch contains details of these intances and i'm wondering if its safe to remove these via SQL commands without breaking reporting services on other machines.   As a side note: All this stems from the fact that when you uninstall Reporting Services, not all of the files / references are removed. So as a general word of warning, if you do an uninstall of RS2005, you'll need to make sure everything's gone before re-installing, throwing away old machines etc. These include folders in IIS and these old instances as mentioned above.  

Token-based server access validation failed with an infrastructure error

Hi We have a new Win 2008 Enterprise x64 server running SQL 2008When we try to connect to the server using Windows Authentication, from a user account which is a domain administrator, we get the following message:"Token-based server access validation failed with an infrastructure error"What needs to be configured here for this to work ?ThanksBruce

How to resolve "Performance counter registry hive consistency check" failed?

I want to install SQL Server 2008 November CTP Developer Enu. When "System Configuration Check" it shows: Rule "Performance counter registry hive consistency check" failed. The performance counter registry hive is corrupted.   And cannot continue installing. How to solve this problem?

Need help with ModalPopupExtender and ValidatorCalloutExtender with server validation

I've spent a lot of time with trying to figure out this problem, but without success, I have problem with positioning ValidatorCalloutExtender on panel (with display:none) within ModalPopupExtender after OnServerValidateHere is my code:<asp:Panel ID="panMPEDispensing" runat="server" Width="400px" Height="400px" Style="display: none"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CustomValidator ID="cvFocus" runat="server" ErrorMessage="<b>Required Field Missing</b><br />value is wrong." ControlToValidate="TextBox1" Display="None" ValidateEmptyText="true" OnServerValidate="cvFocus_ServerValidate" /> <cc1:ValidatorCalloutExtender runat="Server" ID="cveFocus" TargetControlID="cvFocus" HighlightCssClass="ValidatorCalloutHighlightCssClass" /> <asp:Button ID="btnMPEDispensingCancel" runat="server" Text="Cancel" CausesValidation="false" /> <asp:Button ID="btnMPEDispensing" runat="server" Style="display: none" CausesValidation="false" /> </asp:Panel> <asp:Button ID="Button1" runat="server"

How to use (add, read, change, delete) registry keys with vb.net

Find this tutorial on Dot Net SourceReason of this project:This is the next part of the previous tutorial. We'll learn here how to add, change, read, delete registry keys and values using vb.net.I included a sample that contains all those functionality.Project details:1- How to add a registry key/value2- How to read a registry value3- How to delete a key or a value4- Changing a value or a key5- Hints to use registry with VB.net6- The registry reader (VB.net)1- How to add a registry key/valueOne thing that I think I forget to notice. A folder in the registry is name "key" and the elements in this key are named "values".There's a description of each value type in the 5th tutorialNow we'll see how to add a key or a value.Probably you have thought where we'll put it and whether it's a key or a value.So we have 2 things to notice.Visual Basic will automatically show you the hives (they are stored in).You'll have only to choose the needed one.To do that paste the following line. My.Computer.Registry.CurrentUser.CreateSubKey("TestKey")This line will create a key in the HKEY_CURRENT_USER hive and will be named "testkey"Now let's move on to see how to set a value.For the value we'll need three things: Value path, Value name and value value. We can also precise the value type if not Visual Basic will try to assign the value type depending o

Entity Framework: No support for server-generated keys and server-generated values

HelloI tried the Beta 1 of the service pack 1 to .net 3.5. If I try to add an entity (and try to save this), I get the Exception "No support for server-generated keys and server-generated values".How can I add entities to my Sqlce- database?I tried to give the id- column (primary key) in the database an identity, another time without identity, only primary key --> none of them worked. I always get the same error.What do I have to change to make successfully a SaveChanges()?Thanks for your help,Gerald

"Performance counter registry hive consistency check" failed


I'm trying to install SQL Server 2008 R2 Express, but there is just no way to make it work.

I have tried changing the values in the registry as said here.
But it does not help, nor can I find all the values that are mentioned.

I have tried most parts of the KB article here.
But what I could do, does not help, and I cant find the .dat files mentioned, anywhere.

I'm running a Windows 7 installation virutally with Parallels Desktop on a mac for the only intrerst of using VWD/VS C# expresses and the MS SQL Server. I have even tried to just delete the entire windows installation, reinstalling windows again and then opening IE downloading SQL Server the first thing I do and it still fails as default...

I can't se why it should not work. I mean the system is made by Microsoft just like the programs I'm trying to install, so with even them beeing a missfit, go figure why I'm on a mac. I obviously do not know enough about this stuff to fix the registry, I've tried lots of different cleaning programs and stuff, but nothing helps, so what do I do? just give up?

Login failed for user: Reason:Token-based server access validation failed with an infrastructure err



I have installed a named instance of SQL Server 2008 R2 Enterprise 64 bit on Windows Server 2008 R2 Enterprise 64 bit. The os is running as a VM ware virtual machine.

I have created an AD security group for database engine sys admins on that machine. I added my user to that group.So for example;

domainname\machinename_SQL_DBE_SysADmins is a user with SysAdmin server role permissions. User domainname\MichaelEFF is a member of this group.

When I log onto the machine as this user and run the management studio with run as administrator I cannot log into the database engine. The log shows the error:

Login failed for user: Reason:Token-based server access validation failed with an infrastructure error

I've read many posts where the MVP says that the UAC is not passing the group membership. Is this the case? If so then how will role based access ever be possible with windows authentication? How can this be resolved?




Server Side Validation for SharePoint 2007 Form Fields


Hi Guys,

Need to validate NewForm.aspx and EditForm.aspx of SharePoint custom list. My current implementation is by using JavaScript. It's working fine.

Someone suggested JavaScript is not a good approach.I am unable to fetch ids dynamically by JavaScript only for few fields (people picker, calendar control) and in that case i have hard coded the ids. hardcoding is always a bad approache.

Is there any way to validate those mentioned form at server side? Is it really good way to think that my validation can put inside Event Handler?

thanksArup MCTS - SharePoint

Play Sudoku

error on install: Performance counter registry hive consistency check - Status:Failed


Hi, I'm tryng to install sql server 2008 in win vista and in the System Configuration Check, item: Performance counter registry hive consistency check has the status FAILED  all the others items has PASSED and the setup stops here theonly option is CANCEL. Thus anyone knows the possible problem and resolution to this?


best regards

Internal server error after deleting old encryption keys after a database upgrade.



We are in the process of upgrading our current environment from sql server 2005 to 2008R2. Everything goes fine except for SSRS.I have SSRS 2008R2 installed on a seperate machine and it works. We can see the report manager etc. except it's empty of course. I then backup the ReportingServices and ReportingServicesTempDB and transfer them to the new machine. I restore the database and it gets upgraded automatically, no problems there.

Next I go to the configuration manager and change the database SSRS needs to use to the restored DB. At that point I will restore the old encryption keys belonging to that database and as a result I now have 2 servers in my scale out deployment. Seeing as we only need Standard SSRS we get an error saying that Scale out deployment is not supported in this edition(standard) of SSRS.

So what i need to do is delete the source database encryption key. So my name server is named ServerA and my old one is ServerB. I use the rskeymgmt tool to list and delete the old encryption key(ServerB). This way I end up with only 1 server in my instance.

Now when i try to go to the report manager i get the error "An internal error occurred on the report server. See logs for more info". But when i go to my logs it just shows the same message that an error occurred but it doesn't tell me what went wrong.

These a

Using SQL Server 2005 Public Keys in VB.Net

I'm creating an asymmetric key in SQL Server:

                            WITH ALGORITHM = RSA_512
                            ENCRYPTION BY PASSWORD = 'password1@'

I'm then taking the public key...

              SELECT public_key
                            FROM sys.asymmetric_keys
                            WHERE [name] = 'MY_KEY'

I'm trying to import this into VB.Net using RSACryptoServiceProvider.

              Dim RSA As New

I have to add the following line to get it to not give me errors.
(Why?) But the data looks right when I look at the exponet and modulus
of the parameters that are exported and then immediately imported.
Something is obviously being thrown away when I do this, but I don't
know what. It's probably the key to the whole problem.


I encrypt the message...

              EncryptedMessageByteArray = RSA.Encrypt(MessageByteArray,

And in SQL server I try to decrypt the message and I get NULL.

              SET @DecryptedMessage =

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