.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

RijndaelManaged works on workstation, not on server

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :.NET Framework

I have a project that uses the RijndaelManaged class for encryption/decryption.  It works fine on my workstation (xp 32-bit), but when it gets deployed to Windows 20008 Server (64-bit), it gives the following error:

"Specified key is not a valid size for this algorithm."


View Complete Post

More Related Resource Links

MSDTC - TransactionOption "Required" works from my XP Workstation but not from our 2008 Server

I have a SSIS package (2008) that has a sequence container with TransactionOption Required.  This is needed to ensure that multiple tasks commit or fail together.  It also has a custom transformation that establishes (acquires) connection objects. This package works great when run from my local XP workstation.  I can see the distributed transaction starting and committing in the SSIS output. The problem is that when I roll this package out to the server, it fails to acquire the connection, throwing an error at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectinoMAnager100.AcquireConnection(Object pTransaction).  I've verified that the security settings of MSDTC on this server are consistent....they are definitely set to allow inbound and outbound. Are there any issues with MSDTC on Windows Server 2008?  Is it possible that I'm getting an issue because my workstation is 32 bit but the server is 64 bit? Thanks -Mark

2008 server Access database connecting win7 workstation with ODBC link works extremely slowly


I have an Access database on a 2008 server (64 bit), and notebooks with 32 bit win7. The program using the mdb is written in delphy, and running on my notebook, and working on data extremely slow. What can be the problem?

The database connector is an ODBC linked network drive.

On that same configured PC with XP it works normally.


HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

HttpWebRequest NTLM auth to secure server only works in .NET 4

Hi, I am trying to connect to a secure server via a proxy server which requires NTLM authentication, somewhat similar to http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/a4aba6c5-6180-441e-ab60-95347fcdc051 The test app below fails with a 407 error when target framework is set to .NET 2, 3, or 3.5, but succeeds w/ .NET 4: static void Main(string[] args) { WebProxy myProxy = new WebProxy(); myProxy.Address = new Uri("http://testproxy.here.com:3121"); myProxy.Credentials = new NetworkCredential("proxyuser", "password", "testproxy.here.com"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri("https://testserver.here.com/sessions")); request.Method = WebRequestMethods.Http.Post; request.ProtocolVersion = new Version("1.1"); request.Credentials = new NetworkCredential("username", "password"); request.Proxy = myProxy; allDone.Reset(); request.BeginGetResponse(new AsyncCallback(GetResponseCallback), request); allDone.WaitOne(); } private static void GetResponseCallback(IAsyncResult asynchronousResult) { HttpWebRequest httpWebRequest = (HttpWebRequest)asynchronousResult.AsyncState; HttpWebResponse httpWebResponse = null; try { if (httpWebRequest.HaveResponse == true) { httpWebResponse = (Htt

Print control works on reporting server, but not in embedded in application

Hi,I am having an issue where if I click on the print icon in the report viewer embedded in an application, I get the error "unable to load client print control".  However, when running through report manager, this is fine.  I am running SQL Server 2005 SP3 and report viewer 9.Any thoughts would be much appreciated.

SQL Server on a network workstation

I recently installed Microsoft Expression Studio 2 and Visual Studio 2008 on my workstation for web development.  After the instalation my Network Server started displaying error messages that there were duplicate IP addresses being assigned.It was as though there was another server on the system trying to hand out IP adresses.  I disabled the SQL srvices on the workstation with MS config and the Server stopped getting erors.  Any ideas on how to run SQL on my workstation would be helpful.  If this can't be done, can I uninstall SQL from the workstation and still use the Expression Studio 2 package? Thanks :-)

Menu works locally but not on server


I have a menu that uses a sitemap.  The menu works locally, but not on the server.  Below is my code for the menu, data source, and the sitemap.  Any idea why I can run it locally and use the menu, but I cannot use the menu on the server?   


<asp:Menu ID="horizontalMenu" runat="server" DataSourceID="SiteMapDataSource1" StaticEnableDefaultPopOutImage="true"
DynamicEnableDefaultPopOutImage="true" Font-Size="Small" Orientation="Horizontal">
     <StaticMenuStyle CssClass="primaryStaticMenu" />
     <StaticMenuItemStyle CssClass="primaryStaticMenuItem" />
     <StaticHoverStyle CssClass="primaryStaticHover" /> 
     <DynamicMenuStyle CssClass="primaryDynamicMenu" />
     <DynamicMenuItemStyle CssClass="primaryDynamicMenuItem" />
     <DynamicHoverStyle CssClass="primaryDynamicHover" /> 

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="9pt" PathSeparator=" | " ParentLevelsDisplayed="5">

Server.HTMLDecode works but modal popup doesn't close



As the title of this post already mentioned, I'm using a modal popup window to edit rows in the gridview. One column in the gridview contains an URL code. When I fire the edit button a popup opens and show the URL in a textbox in this format: &lt;http://blablaba/re?add=14&amp;t=2&quot; /&gt;

When I am using the Server.HTMLDecode function, the modal popup doesn't close anymore.

I am using the following code:

<div style="text-align: right; width: 262px">
    <asp:Button ID="BtnCancel" runat="server" Text="Cancel" OnClick="BtnCancel_Click" />

<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<asp:LinkButton ID="lnkFakeOk" runat="server"></asp:LinkButton>

<ajaxToolkit:ModalPopupExtender ID="MPE_edit" runat="server" DropShadow="true" PopupControlID="pnlAddEdit"
                TargetControlID="lnkFake" CancelControlID="lnkFakeOk" BackgroundCssClass="modalBackground">

txtURL.Text = Server.HtmlDecode(row.Cells[3].Text);

The funny thing is, when I change it to: txtURL.Tex

'Sys' undefined .NET 4 AJAX works locally but not on server

If you recently created a .net 4.0 site and AJAX doesnt work when on the server, read below.
I was going out of my mind looking for a resolution to this problem. My AJAX enabled website worked great on 
my local computer, but as soon as I uploaded it to the server. BANG!!! I no longer had any AJAX. I would get the 
error: 'Sys' undefined. I finally found the resolution and figured it should be shared.
I spent 2 days doing everything that I could find. This is the only thing that fixed my prob.  
ADD, the following to your web.config and it may fix your problem. It did for me.
     <modules runAllManagedModulesForAllRequests="true"/>
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" pa

Windows Server 2008 R2 - "Open in Windows Explorer" only works in special cases



I am running SharePoint 2007 off a Windows 2008 R2 server and it seems to be running fine.

We're using another Windows 2008 R2 server for clients to login to (using remote desktop) and connect to the SharePoint site. However, whenever a client tries to use the "Open in Windows Explorer"-feature when handling documents, nothing happens. I have run through all the posts here and checked that all services, webdav modules, etc. are as they should be.

I found a fix recently, but it does not make a lot of sense. If I go directly to the site after logging in, it does not work (as expected). However, if I type in the direct path to the documents folder, \\sitename\cases, it opens just fine and if I open a new browser AFTER that, the "Open in Windows Explorer" feature now works perfectly fine.

Is there some way to fix this behavior other than adding a "net use" command to all startup scripts for all the users? It seems like I'm circumventing the problem rather than fixing it.

EDIT: We disabled UNC paths (because of security issues on the client server), but even if we tells you the path is disallowed, simply typing it in triggers the function to work (and still gives you access through SharePoint). Very odd.

Parameter error writing to excell 2007 file using SQL 2008 Server Agent JOB, works in BIDS.


I am getting the following error message when I try to run a script that writes to an excel file calling my Package with a SQL 2008 JOB.

Executed as user: xxxx\xxxxxxx. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.1600.22 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Option "12.0;HDR=YES;" is not valid.  The command line parameters are invalid.  The step failed.

This same package runs correctly if I execute it in dev mode in BIDS.  I had to set 64bitmode to false in Dev mode to get it to work.  I set executable options in the job step to 'run in 32 bit mode'  The error message indicates to me it is trying to run in 32 bit mode which should be correct but it doesn't like the extended parameters. .   

Here is my connection string from the data sources tab on the job

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\xxxx.xlsx;Extended Properties="EXCEL 12.0;HDR=YES";

This was filled in ny the connection object for me.  I have read the article closely at http://toddmcdermid.blogspot.com/2009/10/quick-reference-ssis-in-32-and-64-bits.html and still can't figure out what I need to change. 

Clustered SQL 2008 R2 x64, Oracle linked server works on one node, fails on the other


Juicy bits:

- SQL Server 2008 R2 x64

- Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) 

- Active/passive cluster

- Oracle client 11gR1

- "Allow Inprocess" provider option is enabled


I'm stumped.  Our development, QA and UAT environments are all running the same versions of Windows, SQL, and Oracle client.  Linked server between SQL and Oracle works just fine.


Production is clustered.  The linked server works just fine on one node of the cluster, but if we failover to the other node, attempts to use the linked server in any way, OPENQUERY, GUI, etc..., cause the following error:

OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE" returned message "ORA-12634: Memory allocation failed".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE".


What am I missing?  I've reinstalled the Oracle client on the defective node, verified that the SQL Server service account has full rights to the Oracle client dir

Unable to import from Excel on 64-bit Win 7 workstation to a 32-bit Windows 2003 Server running SQL



I recently moved from Windows XP to Windows 7 on my primary workstation, and since then I'm unable to import from Excel to SQL from any of my SSIS scripts when I run them Locally.  The one instance I'm running into now is importing from Excel 2010 on my system (64-bit Windows 7) to SQL Server 2008 running on 32-bit Windows Server 2003. 

Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)   Jul  9 2008 14:43:34   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition on Windows NT 5.2 <X86> (Build 3790: Service Pack 2)

I even tried creating the import through SSMS and saving it as an SSIS script to get the same results.  The only thing I can think of is the change of architecture on my workstation.  I'm running 64-bit Windows 7 and the server is 32-bit Windows Server 2003 and SQL Server 2008.  Below is the Validation text SSIS returns:

Validation has started
[SSIS.Pipeline] Information: Validation phase is beginning.
Progress: Validating - 0 percent complete
[Source - Sheet1$ [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "SourceConnectionExcel" failed with error code 0xC00F9304.  There may be error messages posted before this with more

Any way to debug using the server GC on a workstation?



We have a race condition somewhere in (some rather twisted) Dispose() logic that only shows up when the app is hosted on a server running under IIS.  If we try and repro on a dev machine (even multi-core), the problem never happens.  It's a pain trying to attach the debugger to IIS for a number of reasons (mainly because some assemblies are dymanically loaded and lifetimes are managed by WCF).  Is there any way to run a console app from dev studio with the Server GC enabled to our unit tests can attempt to reproduce and diagnose our problem?  Thanks!


Erik Johnson

What will happen with SSMS2005 and BIDS2005 after installing SQL Server 2008 client tools to a works


In 2009, after I installed VS 2008, then I installed SQL Server 2005 client tools.  The SQL Server 2005 client-tools setup installed a VS 2005 for my BIDS.  It seemed to me, with VS 2008 installed, installing SQL Server 2008 will install/add BIDS directly into the installed VS 2008.  Am I right? 

My questions are  – what will happen with our old SQL 2000/2005 databases and BIDS2005 packages if I install SQL 2008 client tools at the same workstation with the existing SQL 2005 client tools.  (Installing SSMS 2005
disabled SSEM 2000.) 


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