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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

The RSA key container could not be opened.

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
Hi all, Here is my problem. My web.comfig file in the webserver is encrypted . I want to do a change to the config file. While I'm trying to decrypt  from the command  prompt on the server using following command.  "aspnet_regiis -pd "appSettings" -app "/AppName" I endup with the following error message. Failed to decrypt using provider 'CustomProvider'. Error message from the provider: The RSA key container could not be opened.  The RSA key container could not be opened. Failed! The same command has been working in other environments except in my servers.  Also I'm using web forms and I tried the same in both the servers. I have gone through all websites but no use. Thanks in advance for your help.

View Complete Post

More Related Resource Links

Linq to Sql CompiledQuery container

Ok now let's go. Here is just a little trick but with some interesting patterns that could be useful in some other contexts not connected to Linq to Sql.

When using Linq expressions, like with Linq to Sql, translating the expression into something else (sql for example) is taking time and resources. Sometimes it's negligible, sometimes not...

Tab container rendered with visibility:hidden - This was reported over three years ago.



Here is (more) code that demonstrates the issue.  If the control in the host page is removed the tab control renders correctly.  Otherwise it is rendered with the visibility attrubute set to hidden as reported in the above link.  Is this broken or am I doing something wrong?



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="S2.aspx.cs" Inherits="S2" %>
<%@ Register Src="~/SelectorPatternControl.ascx" TagName="TestControl" TagPrefix="sam" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></cc1:ToolkitScriptManager>

Re-positioning an HTML container with javascript onresize with a Master page.


I have an HTML <div> container that I float to the right of a gridview.  When the browser window is maximized, it looks fine.  When minimized, the gridview positions below the floating container and most of the data is pushed off the bottom of the browser - you have to scroll down to see it.

If I position the floating container above the gridview it looks fine in a minimized window, but looks real bad when maximized.

What I want to do is use a javascript: onresize event to re-position the floating container up or down depending on the window.inner.width AND do it with a Master/Content page structure AND do it for only the one page where needed.

I can capture the onresize event and display the window dimensions but haven't figured-out how to do it with a Content page that still uses the Master page.  I think I'm having a very "thick" week...

- Tinker


table inside tab container goes under the tab



my tab control going crazy

i have this code

and the intable button is under the tab and not inside. why? 


<asp1:TabContainer ID="Tabs"

The report cannot be opened because the data source associated with it is not a report model.


i tried to open a report i created in sql business intelligence development studio in the report builder in wss3 and it gave me this error:

Microsoft.ReportingServices.ReportBuilder.ReportModel.Report: The report 'http://servername:port#/Reports/report.rdl' cannot be opened because the data source 'http://servername:port#/DataSource Library/datasource.rsds' associated with it is not a report model.

This report was not created in Report Builder. Try opening this report in Report Designer instead.

can i fix this so i can open my reports in report builder?


export rsa key container


1) I want to create a rsa key in c# and export the container. I am having difficulty. I create container like this:

CspParameters cspParams = new CspParameters();            cspParams.KeyContainerName = "XML_ENC_RSA_KEY";CspParameters cspParams = new CspParameters();
cspParams.KeyContainerName = "XML_ENC_RSA_KEY";

The msdn example says I can export the container with this syntax:
aspnet_regiis -pa "XML_ENC_RSA_KEY" "NT AUTHORITY\NETWORK SERVICE". This does not work on my XP Host PC. I belive this is applicable for Windows 2003 Server.
So what is the correct syntax for exporting rsa key container from XP host?

2) To get aspnet_regiis.exe path I did something like this:

string winPath = Environment.GetEnvironmentVariable("windir");       
string fullPath = winPath + @"\Microsoft.NET\Framework\v2.0.50727" + @"\aspnet_regiis.exe";

But this path may be different for each host, based on the .NET verison installation.
Is there a way to get the aspnet_regiis.exe path from registry or a environment varaible?

3) Once I get the path to aspnet_regiis.exe I want to invokve it from c# like this.
Is this code correct?

ProcessStartInfo startIn

Deleting a key container. Detecting if it exists.

I have a need to detect if a key container exists. I have looked at http://msdn.microsoft.com/en-us/library/system.security.permissions.keycontainerpermission(VS.80).aspxbut I have two problems. One, the 'Deny' method appears to be obsolete. When I copy the code from this demo I get a warning that Deny is obsolete and will be removed. Two, if I follow the instructions to delete the key from the container it seems to work but if I subsequently try to get the key from the container I get another key and there is no indication that any key had been removed. Any ideas on thus manipulating key containers? Thank you. Kevin

cannot set name attribute value when using a container control

Hi,I created a usercontrol with a Grid. <UserControl x:Class="TestUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300"> <Grid Name="MainGrid" Background="Red" > </Grid> </UserControl> Next I created another Project and referenced the dll where this usercontrol is in. <UserControl x:Class="TestContainer" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:nds="http://schemas.test.eu/BaseElements" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300"> <Grid> <nds:TestUserControl> <Button Name="Btn1"></Button> </nds:TestUserControl> </Grid> </UserControl> With the schema i can load a instance of this usercontrol onto the new usercontrolNext I load a button onto thisWhen I now set the name property, the error "Warning 1 Cannot set Name attribute value 'Btn1' on element 'Button'. 'Button' is under the scope of element 'TestUserControl', which already had a name registered when it was defined in another scope. Line 7 Position 21. ......

Access the SQL Command Query Value Property from the OLEDB Container within a Script Task

Hello, I'd like to Access the SQL Command Query Value Property from the OLEDB Container within a Script Task so I can audit the queries which are executing. What is the syntax for this or does anyone have a sample on how to do this? Thank you

Change active tab in Ajax tab container using javascript

I have been using the ajax tab control. I need to change the active tab index of the tab container through javascript. Can please anyone tell me how can i do it Cheers Sohail Sayed

Tab Container, Tab panels with User Controls - bug?

Hello all, I have a aspx page with a tab container, and 5 tabs on it - 4 of which hold user controls on them. I have a strange issue that presents sometimes, and I am not sure just what is causing it. Here is the scenario : there is one user control on each tab. On each of those user controls, there are a number of radio buttons in Update Panels. If a user selects one of the tabs, then selects another tab and clicks on one of the radio buttons on that tab causing a postback, when the page refreshes, the content of the previous tab becomes visible at the top of the current tab, pushing the original content down below it - as if the content of the previous tab has been appended to the top of the current tab's content. Has anyone out there experienced anything like this? What I did to "fix" the issue was simply to go into the aspx code for the tab container, and change the order of the tab panels in the code, something like this :  <cc1:TabContainer ID="tabContainer" runat="server"> <cc1:TabPanel ID="tabFirstTab" runat="server" HeaderText="My first tab" > <ContentTemplate> <uc1:usercontrol1 ID="UC1" runat="server" /> </ContentTemplate> </cc1:TabPanel>

Trigger a macro anytime a site or web is opened in SharePoint Designer

Within SharePoint Designer (not interfacing with SharePoint services), I would like to have a macro automatically run anytime a web is opened. I assume I need to use the OnWebOpen VBA event but I'm not sure how to write this into a module. Is there any chance someone could assist me with what this sub routine should look like? Thank you! Greg

ForEach Loop Container Configuration Question

So here is my question/situation. I have a table that contains a list of all of our servers/instances for my organization. I have a script that I'd like to execute against all of the servers in that list and I was thinking that I should be able to use this container to pull the name/instance from the table, execute the script, store the results in a local table. However, I'm not quite sure on how to attack this meaning not sure which configuration that I would need to use to get me going down the right direction. I've looked around and found alot of documentation on how to enumerate multiple files and folders, but nothing really for what I'm trying to do. Any help or direction would be greatly appreciated.Big Ern

Office document are not opened correctly! (XLSX gives error. XLS asks login)

I have SharePoint 2010 based farm and MS Office 2007. SharePoint have Enterprise feature enabled. In my test I'm opening documents in the front-end machine. Problem 1: When XLSX excel documents are tried to be opened, it try to open to the browser. Error is given: Your request can not be handled. Please wait few minutes and try again.(free translation from local language) Because of error I started Excel services, but nothing changed. Problem 2: When XLS excel documeents are opened, it opens to the Office Excel client, but it request login. After login xls document is opened correctly. Why I need to login? Problem 3: When DOC word documeents are opened, it opens to the Office Word client, but it request login. After login doc document is opened correctly. Why I need to login?Kenny_I

SSIS 2005 - Foreach loop container - Stopping the loop after processing X number of file?

I need to stop the Foreach loop container from processing more files in the folder than desired. Scenario:  If I only want 1 files processed, i need to stop the loop after it finds 1 file.  No matter what the contraints or tests or variables I set, the loop processes all the files in the folder.  This is bad because I need the value of the 1st mapped variable and not the last one it finds. I have tried counting records and setting variables used in the contraints but to no avail  Nothing seems to stop the loop. Please advise

How to go to next iteration of ForEach Loop container on task failure

I'm using a ForEach Loop container to iterate through a set of files and import/validate the data.  Within each loop, the first thing that happens is that I fill a variable from a table and then use a script task to make sure that the rest of the package should be run for this particular file.  If it should continue, I set Dts.TaskResult = Dts.Results.Success, and if it shouldn't, I set it to Dts.Results.Failure.  My question is, how do I get it to exit the current iteration of the loop and continue to the next iteration?  The way it is now, the package just stops completely.  I set the FailPackageOnFailure property to False for the script task, but that doesn't make a difference.  I also tried pointing a failure precedence contstraint bacl to the loop container, but that's not allowed.  How can I make it just continue in the loop?   Thanks.

Using Foreach loop Container in SSIS 2005 package and scheduling the package using SQL job on 64-bit

I've an SSIS package 2005 which uses a for each loop container, this package runs fine when I run it on the local machine . My server is 64 bit SQL 2005 and I 've successfully deployed my package on the server both to the File system and SQL server. I've also set Run64bitruntime to false in my pacakge. Now I need schedule the package using SQL job. Since Microsoft Jet Provider 4.0 is not available for 64 bit, I had to write script to schedule the package. Here is my script. declare   @ssisstr varchar(8000) declare @returncode int set   @ssisstr = 'dtexec /sq Package1 /DE 123' EXEC   @returncode = xp_cmdshell @ssisstr select   @returncode I'm getting the following error when I execute the job. Could not load package "Package1" because of error 0xC0010014. Description: One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors. I'm getting the same error if I run this from commandline. Any help would be really appreciated. Thanks in advance. PARC
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