473,804 Members | 3,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SSPI-Error when impersonating to a fixed server account in ASP

System.Security .Cryptography.U tils._CreateCSP throws a
System.Security .Cryptography.C ryptographicExc eption with the message "file
not found" when we impersonate IIS5 to a fixed account from web.config. If we
let it run under the ASPNET user things are fine.

does anyone have an idea what goes wrong here?

web.config:
<identity userName="serve r_account" password="passw ord"/>

default.aspx (to verify the error):
using System;
using System.Data;
using System.Configur ation;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
using System.Security .Cryptography;

public partial class _Default : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
try
{
using (RSA rsa = RSA.Create())
{
string a = rsa.ToXmlString (false);
Label1.Text = "succeeded: " + a;
}
}
catch (Exception ex)
{
Label1.Text = ex.ToString();
}
}
}
Sep 4 '06 #1
0 804

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1728
by: Steve R | last post by:
I am using the ConstructionEnabled attribute to pass in a SQL connection string. <Transaction(TransactionOption.RequiresNew), _ ConstructionEnabled(:="Data Source=mymacinename\NetSDK;Integrated Security=SSPI; Initial Catalog=mydatabase"), _ JustInTimeActivation(True)> _ Public Class MyServicedComponent Inherits ServicedComponent
1
5145
by: Il Ventu | last post by:
Hi My company uses a Windows 2000 server with MS SQL Server 2000. We have many clients with administrative software that use the MS SQL server, the problem is that we experimented randomly the error "Cannot Generate SSPI Context" and the only way to work with DB is log out the client. I'm looking the MS Technical sheet but there's no resolving hints that can help.
2
2237
by: Ken | last post by:
How can I copy data from SQL to MS Access using dsn-less connection and not using SQL DTS? I have this but am stuck. I just want to do an export but can't figure out how to do a "select into". It pastes the data in SQL instead of access. The below code will cycle but I will have to create a table to place the data first. Is there an easier way. Sub getTables() Dim cnnSQL As ADODB.Connection Dim cnnMSA As ADODB.Connection
0
2450
by: Josh Blair | last post by:
Hello, I've been looking for an example of how to use SSPI for validation from within C# much like the Q180548 sample code in C++. Has anyone seen anything like this? I've found a VB6 example of this but still no C# version. TIA,
9
5288
by: Kristijan Marin | last post by:
Hi, I have a project to do, that has to transfer files over SSL/SSH connection.(FTP over SSL or some other method) I searched a lot but didn't find anything usefull :(( Has anyone any clues how to do that ?? Thank you. Kris
1
27829
by: Srinivasa Reddy K Ganji | last post by:
Hi I have come across this type of code at many places. New SqlConnection("Data Source=(local);Initial Catalog=XYZ;Integrated Security=SSPI;") I assume that the database connection details are hidden here. What is "Integrated Security=SSPI"? Can anyone guide me how to set this up using c#. Also is it possible to set up this type of connections on web sites hosted
8
1662
by: Sandy | last post by:
I have two tables, tblPost - (Cols PostID, TopicID, UserID, Question, PostMsg and PostDT) and tblTopic - (Cols TopicID, Topic). I am trying to get tblPost.Question and tblPost.PostDT into DataGrid1 when the DropDownList1 (which consists of Topic) is clicked. I have the following code: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not IsPostBack Then
2
1145
by: Alan | last post by:
Dear all, I want to develop a program and there is a logon page. How can I check the logon name of the domain and the password are matched that the user type in? Thanks Regards, Alan
3
4471
by: equ | last post by:
It makes no difference if I'm working with Enterprise Manager, Query Analyzer, Access, self written app with OleDb or Visual studio 2003 builtin DB manager. Everything is fine but aufter some time - about 30 minutes I get message "cannot create SSPI context" After rebooting my machine I can work for another few minutes. Configuration:
5
2064
by: znubbe | last post by:
Hi, I hope anyone can help me with this problem. I have a field of image type in a SQL 2000 database. I'm using this code to insert a document: Dim conn Dim rs Dim oStream
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.