Microsoft Developer Network > 포럼 홈 > Visual C# IDE > VS 2005: "Key not valid for use in specified state"
질문하기질문하기
 

답변됨VS 2005: "Key not valid for use in specified state"

  • 2006년 1월 11일 수요일 오후 9:02LankyNibbs 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi all-

    I'm running VS 2005 final release version.  I have a solution with two projects in it; an ASP.NET website in C# and a VB project which is my data access layer.

    Yesterday, this code was working fine.  I can compile and run the solution, and all the code works.

    But when I try to access or add a new datasource through the VS 2005 Data Sources Explorer, I get a popup which says: "An unexpected error has occurred.  Error message: key not valid for use in specified state."

    This message pops up after I select database as the source of my new datasource.  The wizard does NOT fail if I use a Web Service as my new datasource.

    Any ideas on what is happening, and how to clear up the problem?

답변

  • 2006년 1월 11일 수요일 오후 10:31LankyNibbs 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Hmmm, possible solution:

    I went into my Server Explorer and created a new Data Connection to replace the old one.  I checked the option to leave sensitive info exposed in the .config file, and was able to then create my new data sources.

    I think what happened here is that somehow VS 2005 lost an encryption key, and couldn't read the encrypted sensitive info in the config file for the autogenerated data connection.

모든 응답

  • 2006년 1월 11일 수요일 오후 9:35LankyNibbs 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    More information:

    I uninstalled WSE 3.0 final and reinstalled, rebooted, and started up VS 2005.  Opened my solution, tried to add a new data source, and the wizard didn't immediately throw the error!  cancelled the Add Data Source operation, and tried it again.  This time, I got this popup:

    "An error occurred while creating the new data source:  value does not fall within the expected range."
  • 2006년 1월 11일 수요일 오후 10:31LankyNibbs 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Hmmm, possible solution:

    I went into my Server Explorer and created a new Data Connection to replace the old one.  I checked the option to leave sensitive info exposed in the .config file, and was able to then create my new data sources.

    I think what happened here is that somehow VS 2005 lost an encryption key, and couldn't read the encrypted sensitive info in the config file for the autogenerated data connection.
  • 2006년 1월 22일 일요일 오전 6:15mjl 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

     

    I met the same issue and resolved by the same way - removed and created a new data connection. Thank you LankyNibbs.... :D

  • 2006년 2월 9일 목요일 오전 1:35Moumen 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hi,

    This method did not work with VB.NET Applications.

    After 6Hours of searching for solution on the internet, I back with no answer, but at least i know what cause the problem, it was Changing Administrator password .

    "The most common issue in this area occurs when a local (non-domain) user's
    password is administratively reset. On WinXP, this causes all data protected
    by DPAPI (including user private keys) to be lost; at least until the
    password is set back. This is by design, and in fact is an important
    security feature.
    "

    So my next step was searching where VS2005 Save the Data Connection information, after few minutes of searching in my pc I found it, it was in:

     C:\Documents and Settings\Administrator\Application Data\Microsoft\VisualStudio\8.0\ServerExplorer\DefaultView.SEView

    Then I tried to modify the keys in this file, but with no results.

    My last hope was deleting the file, and finally it works  , and all projects runs again normally.

     
  • 2006년 2월 9일 목요일 오전 10:07nrb1955 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I had the same problem after re-installing Active Directory on my Primary Domain controller and copying my roaming profile to my 'new' user profile.

    I deleted the entire 'C:\Documents and Settings\%username%\Application Data\Microsoft\VisualStudio' folder and all was well.

  • 2006년 4월 4일 화요일 오전 7:21Al1234511234 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    ditto did the same thing

    renamed

    C:\Documents and Settings\al\application data\Microsoft\VisualStudio\8.0\ServerExplorer\DefaultView.SEView

     

    and everything was fine

  • 2006년 4월 4일 화요일 오전 9:25twistur 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I got the same problem and your post just spared me the misery of rummaging for solution . Thank you very much
  • 2006년 6월 7일 수요일 오후 1:42Larry Niemoeller 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I am working on a VB.NET Windows application.  Every six months are password has to be changed.  The provided method to do so failed, so the contractor (administrator) reset my password.  I had the same problem.  I deleted and created the connection files (2) and it appeared to resolve the above problem.  However, when I went to publish my project, I received the error;

    "Sign Tool - keyset does not exist"

    Any ideas?  The system won't let me change my password back to the old one, as it is in the password history file.

    Thanks, Larry Niemoeller (240) 453-8296

  • 2006년 7월 3일 월요일 오전 9:50antointhe 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Larry

     I was going to say the following...

    Since I don't have a similar setup, I suppose I can only go lateral with this idea.  I would assume that there is a similar file for signing your code.

    I assume you got your datasources working since you didnt mention those.

  • 2006년 7월 25일 화요일 오후 1:55Flounder 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    This solution also worked for me.  We changed our domain name and got new userid's.  Next thing I know, could not open any of our datasets in our projects.  Renamed the file and everything is ok now.
  • 2006년 8월 1일 화요일 오전 12:13Integralsoft 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Thanks a LOT! You solved my problem and saved me a lot of aggravation.
  • 2006년 8월 1일 화요일 오후 1:02gruskada 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Deleting the whole folder (C:\Documents and Settings\%username%\Application Data\Microsoft\VisualStudio\8.0) worked for me as well. Thanks for posting this.
  • 2006년 8월 31일 목요일 오후 2:22ibhoopn 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    renamed file, thanks for the solution!
  • 2006년 11월 14일 화요일 오후 4:48Zantac 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

     

    Strange I'd changed my Network Password and this fault happened.

    A new instal did not cure the problem.

     c:\documents and settings........etc................didnt contain the folder application data---- so! I deleted the  my documents\ Visual Studio 2005\ Backup Files folder

    Also deleted the datasource datatables that remained persistent.

    The latter may have been sufficient to cure

    Then Back on Line. 

  • 2006년 11월 16일 목요일 오후 7:47Leafo 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Thank you so much!! You've all just made my day!

    I was ready to reinstall everything after not being able to find the solution for several hours.

    Had the same error after switching domain and thus got a new user profile. Renaming the file DefaultView.SEView instantly fixed my problem!

  • 2006년 11월 17일 금요일 오후 2:04Mr. Halliday 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Moumen - You are brilliant.  NEVER would have found this.  My problem was having been assigned to a new domain for windows logon. 

    What a hero.


  • 2006년 12월 4일 월요일 오후 1:22TucsonAutomation 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    The following worked for me:

    From the main taskbar in VS 2005, go to View|Other Windows|Server Explorer.

    Select your existing Data Connections, and delete them one at a time.

     

     

  • 2006년 12월 29일 금요일 오후 9:55KCastillo0319 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Same thing here.  I didn't realize I had a connection to anything (had to reformat computer), so it didn't occur to me to look in the Server Explorer.  When I did, I saw a defunct connection.  I removed it, and now VS is working fine.
  • 2007년 1월 2일 화요일 오전 3:28den01wag 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    This was very helpful .... I could not configure a Data Adapter or create new data sources until I removed old and probably defunct data sources.   Seems like a bug in VS.NET 2005.

  • 2007년 1월 3일 수요일 오전 6:09Ehsanullah Jan 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Thanks Moumen,

    This solution has worked for me.  We changed our domain name and got new user id's (same user names as before but, as we all know, Windows uses identifiers for each account rather than its user name).  Afterwards, I could not open any of my datasets in my project.  I deleted the file and everything is ok now.


  • 2007년 1월 8일 월요일 오전 1:25ranz 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I hope Microsoft is listening.  Enough of us are seeing this that it deserves closer scruntiny. Thanks for the workaround. -ear
  • 2007년 1월 31일 수요일 오전 1:51DanBov 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Worked for me - saved me loads of time! 

    Thanks Moumen!!

     

     

  • 2007년 2월 7일 수요일 오후 6:08Paul Programmer 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    You rock!

     

    I had a slightly different situation from changing my domain.  I built the solution on a computer in the domain with integrated security to my SQL Server.  I then opened the same code from my personal computer which is not in the domain.  My personal computer could not open or add any new datasets to the project.  However, your solution is correct, my source code was fine but my visual studio wasn't.  Thanks very very much.

  • 2007년 2월 21일 수요일 오전 10:59Sergey Perepechin 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
     Moumen wrote:

     C:\Documents and Settings\Administrator\Application Data\Microsoft\VisualStudio\8.0\ServerExplorer\DefaultView.SEView

    Then I tried to modify the keys in this file, but with no results.

    My last hope was deleting the file, and finally it works  , and all projects runs again normally.

    That helped me too! Thanks guys!

  • 2007년 3월 1일 목요일 오후 7:05Tim Huckabay 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hi,

    I am encountering a somewhat different version of this same issue, and none of the work-arounds posted in this forum or elsewhere on the Net have helped thus far.  Here is a little background on the system I'm using:

    1) Installed a clean Windows XP Pro SP2 OS, and included IIS in the install; this computer, which I named WINXPPROVIR1, is not on a domain, but is joined to a workgroup on the network.  (To be more precise, this is running in the latest version of VMWare Workstation 5.5.3, and using NAT.)
    2) Activated and fully updated the OS using Microsoft Update
    3) Installed SQL Server 2005 Developer (complete install, all services); did not use default instance, but instead created a named instance (SQL2005DEV1 or WINXPPROVIR1\SQL2005DEV1)
    4) Installed Visual Studio 2005 Professional (everything except SQL Server Express)
    5) Installed SQL Server 2005 Service Pack 2
    6) Installed Visual Studio 2005 Service Pack 1
    7) Fully updated the OS again using Microsoft Update

    OK, to this point, everything is perfect.  Both Visual Studio 2005 SP1 and SQL Server 2005 SP2 (instance SQL2005DEV1) , are behaving perfectly in every way.

    Here is where the rub starts to manifest, however:

    8) After verifying that everything is working as it should, I downloaded all the Feburary 2007 sample databases and code updates from Microsoft.  I followed Microsoft's instructions to the letter in terms of how to install these.  First, I deleted (dropped) the AdventureWorks and AdventureWorksDW databases in SQL Server 2005 SP2.  Second, using Add/Remove in the Control Panel, I uninstalled both of these databases as well as all code samples from SQL Server 2005.  So far, so good.  Third, I installed the new (February 2007) AdventureWorks (CI version), AdventureWorksDW (CI version), and AdventureWorksLT databases, and attached all of these to SQL Server 2005 SP2.  Fourth, I used the Surface Area Configuration utility to ensure that CLR integration with SQL Server 2005 is enabled.  Again, so far, so good, but rebooted my system for good measure; again so far, so good.

    9) Then, with all SQL Server 2005 services started (including Analysis Services), I installed the new Samples and Code from the February 2007 update.  Now, to complete this process, I opened the Enterprise version of the new AdventureWorks Analysis Services Project solution in Visual Studio 2005 (BI); see http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm .  So far, things APPEAR to be good, but they are not!  In Microsoft's instructions, this new project needs to be deployed.  However, though Microsoft does not mention it at all, I first had to change the server from "localhost" to "WINXPPROVIR1\SQL2005DEV1) for both the solution (under Deployment properties) as well as for the various datasources.  So, I did that.

    10) Now, finally, comes the rub:  As soon as I attempt to Process and/or Deploy the solution, I receive the "Key not valid for use in specified state" error.  I then searched high and low on the net, and came across this forum as well as several other posts.  (Most of these posts have to do with Reporting Services, but some do not, and they also are not with the very latest service packs and patches from Microsoft; again, I have the most current installations possible.  Therefore, Microsoft has yet to properly address these issues.)  OK, I have now tried every work-around suggested on this forum, to include deleting and re-creating both my database connection and the various datasources related to it for this solution; nothing I have tried has made the slightest difference; I continue to receive the "Key not valid for use in specified state" error.

    Does anyone have any suggestions?  I am baffled at the moment.  Clearly, this is a bug or poor design of some sort on Microsoft's part that is capable of manifesting in a variety of ways and under a variety of scenarios.  Yet, I am disheartened to see it occur under a scenario where everything is a perfectly clean and updated install.  (By the way, I have repeated the above installation process from scratch three times now, and received the same results every time.)

    Please help! :)

  • 2007년 3월 8일 목요일 오후 12:26JudgeDredd 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hi,

    I have a similar problem on my SQL Server 2005/Analysis Services 2005 installation. I have built my own cube, NOT using AdventureWorks. When I deploy my Cube to my local machine, I get the same error "Key not valid for use in specified state". Have also loaded service packs and still get the same problem. The solutions above dont work for me, it just further contributed to the problem by causing additional issues. If someone can help with this it would be awesome, would save me hours of wasted development efforts. Tx  

     

    JudgeDredd....out

     

     

  • 2007년 3월 14일 수요일 오후 12:42JudgeDredd 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hi,

     

    I have managed to find a solution to this problem on my AS 2005. The situation I have is that I have AS 2005 & the cube located on my local machine. The relational database resides on another machine on our network. The way that I have resolved this, is to set my Impersonation mode to "Use a specific user name and password". Then for the logon details I have used my network Windows logon details, since this user has permissions to log onto the remote database (this user has been created/granted access to the remote Db). This seems to work fine for me, so voila Deployment successful...!!

    O and one other thing. My SQL Server Analysis Services service has been set to Log On as "LocalSystem". This is vital, dont forget about this. Hope this helps someone with the similar problem

    JudgeDredd...out

  • 2007년 3월 14일 수요일 오후 6:35Tim Huckabay 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Well, JudgeDredd has helped to "clue me in" and thereby saved the day:

    Apparently, before the AdventureWorks Analysis Services Project can deploy, the SQL Server 2005 Analysis Services service must NOT be running under the Local Service account; as Microsoft states in MSDN, "Services that run as the Local Service account access network resources as a null session with no credentials."  Switching the execution context to Local System for the Analysis Services service solved my problem.  Because I am connecting to a local SQL Server 2005 instance rather than to an instance across the network, it was not necessary for me to switch the Data Source's impersonation mode (under the Impersonation Information tab) to "Use a specific user name and password" (and this may have been unnecessary even under such a configuration); instead, I was able to leave the impersonation mode set at the default "Use the service account".  With the default set to "Use the service account," and my change of the service execution context to the Local System account for Analysis Services, the necessary credentials are now being passed to my SQL Server 2005 instance from the Visual Studio 2005 project, and all is well.

    So, at least in my case, this is not a Microsoft bug, nor poor design on Microsoft's part, after all.  However, it does reflect poor documentation and a poor explanation of what is necessary to use the new AdventureWorks Analysis Services Project from Microsoft.  Microsoft does not bother to mention that you cannot get away with using the Local Service account since it does not pass credentials when attempting to access network resources (e.g., when trying to deploy a project involving Analysis Services updates to a SQL Server 2005 database from Visual Studio 2005).  Likewise, Microsoft does not bother to tell you that if you are using a named instance of SQL Server 2005, rather than a default local instance, that you needd to update all the "LocalHost" references throughout the solution to use your named instance instead (e.g., under Deployment in the Project Properties, the Connection string in the Data Source Designer, and, in this example, the XML for the Adventure Works cube).

    Thanks!

  • 2007년 3월 15일 목요일 오후 2:02john bracken 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    When I tried to add a sql connection data source to my application I had a pop up window with this error on it, "key not valid for use in specified state".

    I tried deleting the defaultview.seview file and I still got the error.

    I have the express version of dot net and the standard developers version of dot net. So I connected to my data source using the express version and copied the defaultview.seview from the express version’s folder to my standard developers version’s folder.

    By doing this I fixed the problem.

    Hopes this helps some one.

  • 2007년 4월 3일 화요일 오후 7:49SirCyr 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Ah ha! Thanks!
  • 2007년 5월 4일 금요일 오후 4:25rrlevron 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    thanks.  I got the same error working through one of the projects in www.asp.net.  I just deleted the old data connections and now my code works great.

     

     

     

  • 2007년 6월 20일 수요일 오전 8:56Mark Leaver 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Moumen...

     

    Legendary. I had the same problem and thought that I would have to recreate my datasets all over again. I renamed the file and restarted VS and boom everything works properly again...

     

    Well done you and cheers.

  • 2007년 6월 22일 금요일 오전 6:33rageit 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I could not open my dataset in design mode. It displayed same error message. Deleting old connection and creating new one still didn't solve the problem. I overcame this by deleting all old connections that were present but were not in connected state.

    Thanks.

  • 2007년 6월 28일 목요일 오후 3:12don natti 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Thanks, Moumen. This really worked for me.

     

    ONE!!!
    DON NATTI!!!

  • 2007년 7월 18일 수요일 오후 3:56sturdy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    This still appears to be a problem. Local policy is to force new passwords every 90 days but this is the first time I have had this problem. Deleting the file resolved the issue for me. None of the other solutions found on these forums would work such as delete and create a new data connection (no effect) or create a new data source (wouldn't let me, same error). I'm using VC# 2005 EE SP1. Thanks Moumen.
  • 2007년 9월 24일 월요일 오후 8:40Liubomir 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Thank you very much for the solution! I removed  the entire folder C:\Documents and Settings\Liubo\Application Data\Microsoft\VisualStudio and then restarted all VS instances I had launched on the machine. Then it started to work!Great thanks!

  • 2007년 9월 27일 목요일 오후 7:39Miles2Go 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Thanks a lot! This was really helpful. You managed what our consultants couldn't.

  • 2007년 11월 5일 월요일 오전 10:22Dina Elwy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

     

    Thanks alot LankyNibbs ,

     

    Your solution is the true solution I delete all connection and make new data connection and then be able to create new data sources.

     

    thanks alot

  • 2007년 11월 20일 화요일 오전 5:23abdu qadar 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Dear All!

    i did not change my password and nothing else.

    Actually i have installed oracel 9i client on my system. after this. when i open vs2005 all db connections were lost.

    i tried for new one but same message came.

     

    also my sql server 2000 registerations were vanished including local server. i have registered agin.

     

    but problem is with vs2005.

     

    i tried all above given solutions but invain......

    since a couple of hour i could not get back to my work....

     

    i need urgent help. Thx in advance.

     

  • 2007년 12월 17일 월요일 오전 10:21safister 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    moumen you solution really worked.

     

    thanks a million

  • 2007년 12월 18일 화요일 오후 7:35jwbutler123 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I getting the same message except from Microsoft.VisualStudio.Data.DataProtection.DecryptString.  Does anyone have a clue how to fix this one?

     

    Thanks,

  • 2008년 1월 18일 금요일 오후 9:00Mike Cl 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Moumen,

     

    Thanks a bunch!!  I have been searching for a fix for ever.  This did the trick.

     

    Mike

     

  • 2008년 2월 6일 수요일 오전 2:51Warez_Willy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    renamed the 8.0 directory 8.0copy  and this problem was fixed

  • 2008년 2월 7일 목요일 오전 11:55SenorHughes 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I got a new username at work and had this problem. Renaming the file did not work but deleting the whole folder

     

    C:\Documents and Settings\<username>\Application Data\Microsoft\VisualStudio\8.0

     

    did the trick.

     

  • 2008년 3월 7일 금요일 오후 9:48Ricardoasd 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

     

    I don´t find

     

    C:\Documents and Settings\Administrator\Application Data\Microsoft\VisualStudio\8.0\ServerExplorer\DefaultView.SEView

     

    there are other url where i can find that file, or rther file, because y i didn´t find

  • 2008년 3월 22일 토요일 오전 1:48IT7 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Tim:

    The solution found worked great!!
     
    1) I stopped the AS Servivce in Windows Admin Tools under Services
    2) Double clicked "SQL Server Analysis Services (YOURSQLSERVER)"  and went to the "Log On tab"
    3) Clicked "Log On as: Local System account"
    4) Restarted the service.
    5) Opened my original projects and made sure the Datasource "Impersonation Information" was set to "Use the service account"
    6) Now my Dev/Test DM projects are deploying (will go back and monkey around with the
    AdventureWorks Analysis demos).

    Thanks for highlighting this -it is a poor documentation. 

    IT7


  • 2008년 5월 30일 금요일 오후 2:52Rens Duijsens 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hello,

    I'm using VB.NET 2008 under Vista.
    I have this same error, but deleting directory '(C:\Documents and Settings\%username%\Application Data\Microsoft\VisualStudio\8.0)' won't do the trick, because this direcory does not exist under Vista.

    Please assist me in solving this problem.

    Friendly greetings

    Rens Duijsens
  • 2008년 8월 1일 금요일 오후 10:41Morrisgrill 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    So can we see posts just for Windows XP, the url for Windows Vista is C:\Users\{Username}\AppData\Roaming\Microsoft\VisualStudio\8.0\ServerExplorer
    and the file: DefaultView.SEView will be deleted
  • 2008년 8월 22일 금요일 오전 3:21Ankita_V 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi,

     This thread is really helpful. I was also getting similar error "key not valid for use in specified state". I solved it by deleting invalid connections that were red crossed as written in one of the posts. And problem was solved. But can someone explains the reason behind it. What actually caused the error? It would be really beneficial for i think most of us.

    Thanks.
    Ankita
  • 2008년 11월 23일 일요일 오전 12:25Coder666 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     제안된 답변
    How to Fix the Error 2 SignTool reported an error 'Key not valid for use in specified state.

    This error as stated in this tread is if you have changed your username,password or computer name.

    I have had this problem to and this is what to do if you don't have a database connected
    in your project but still are unable to Publish your project.

    Find the file extension in your project folder with .vbproj

    This is a xml file but with a different file extension these are your application settings.

    Find the lines that read as fallows:

     <ManifestCertificateThumbprint>71CAA3B75391593B58B65EA0D322838B9B7C05F7</ManifestCertificateThumbprint>
        <ManifestKeyFile>YOUR PROJECT NAME_TemporaryKey.pfx</ManifestKeyFile>

    NOTE: Make sure you have your vb complier closed
    before you do this. If you don't the file will be
    saved as is was before you did the edit.

    Now restart you complier. You will now be able to upload your project.

    • 답변으로 제안됨Kevin Coulson 2009년 2월 2일 월요일 오전 12:24
    •  
  • 2009년 2월 2일 월요일 오전 12:27Kevin Coulson 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
     Coder666, you are the man!

    This fix solved a problem that had me on the verge of destroying my screens!  Definately the last time reinstall Windows int he middle of a project!

  • 2009년 7월 9일 목요일 오후 2:08nechr 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    could someone pls help!!

     I had removed the administrator password. and got the same error mentioned above when i try to publish my project "Error2 SignTool reported an error 'Key not valid for use in specified state."

    I deleted the ServerExplorer folder but that dint help and so i deleted the entire VisualStudio folder from Appdata\roaming\Microsoft and restarted VS2005. but that dint help either.

    I really need to get this working. could someone suggest any other way to solve this problem

  • 2009년 9월 13일 일요일 오후 5:53SOSVS 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    LifeSaver....this worked for me > I overcame this by deleting all old connections that were present but were not in connected state. thx Rageit...

    SOMEONE ON THE VS TEAM GET UP N ____ ON SOMEONE N MAKE SURE THIS DOESNT HAPPEN AGAIN...this jus wasted 3hrs of my time...