jitter123456's Q&A profile
Visual C# Same KEY & IV for TripleDES Encryption as well as Decryption in 2 different Win Services.
Hi, I want to encrypt as well as decrypt a file using TripleDES. My problem is that I am autogenerating the KEY & IV while encrypting the files. As per my project requirement, I have to keep both Encryption & Decryption parts in two differents windows services. Can any one please guide me how to supply same KEY & IV for both I am using the following coding for encryption & decryption: //.......................... private static void EncryptData(String inName, String outName, byte [] tdesKey, byte [] tdesIV) { //Create the file streams to handle the input and output files. FileStream fin = new FileStream(inName, FileMode.Open, FileAccess.Read); FileStream fout = new FileStream(outName, ...Show All
.NET Development How do you Un-Set a bit field (flag enumeration)...?
Ok, we all know how to SET an enumeration with "OR" and we all know how to check an enumeration with "AND", but g.d. how do you clear (unset, remove) a flag < Flags () > _ Public Enum LineOutputOptions TraceLevel = 2 MemberPosition = 4 TreeifyOutput = 8 SourceTypeName = 16 End Enum This is working only if it is sure that the flag is set. If the state of the bit is unknown, you have to set it first with an "or": Code Snippet options = options Or LineOutputOptions.SourceTypeName Xor LineOutputOptions.SourceTypeName Tobias ...Show All
SQL Server display object on every page and List question
Hi there, a little new to Reporting Services 2005, but can somebody show me how to display an object on every page I have a sub report that I use and I wish for it to display on every page. As well, is it possible to keep items in a List object together For example, my List dynamically grows, but I wish to keep the items in the list together on the same page. Right now, the items split onto different pages. Any help or comments is greatly appreciated. Thanks in advace! To display the sub-report on every page, just create a table, place the sub-report in the table header, then mark the table header repeated on each page. For the second question, try setting the KeepTogether property on the List. ...Show All
.NET Development TypeConverter bug?
Hello forum. Can somebody explain me, why following code cause an error : decimal d1 = 1000.55M; string s1 = d1.ToString( "N" ); TypeConverter cv = TypeDescriptor .GetConverter( typeof ( Decimal )); object obj = cv.ConvertFrom(s1); While the next code not: decimal d1 = 1000.55M; string s1 = d1.ToString( "N" ); decimal .TryParse(s1, out d1); Through reflector I found, that TypeDescriptor calls internally following: internal override object FromString(string value, NumberFormatInfo formatInfo) { return decimal.Parse(value, NumberStyles.Float, formatInfo); } while Decimal.TryParse calls: public static bool TryParse(string s, out decimal result) { return Number.TryParseDecimal(s ...Show All
Visual C++ Vector Based Game
I was looking to write a vector based game. Mainly its to learn not to entertain. i want to code it in c++ and was wondering if someone could point me to a few resources; i have had some trouble finding any code examples. Hello Re: Vector Based Game Such questions are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 For such issues please use the newsgroups at http://msdn.microsoft.com/newsgroups (although I hope some of the links suggested above help too) . OTP Thanks Damien ...Show All
Visual Studio Team System Adding Workgroup users to TFS
Hi, I'm installing team foundation server on a clean server build in a workgroup environment. Its all gone smoothly so far and I've managed to create a new team project. However when I add a workgroup user to the team project they are able to view the portal page but some of the page section are reporting the following error: The permissions granted to user 'CONWY\gwyn' are insufficient for performing this operation. (rsAccessDenied I've added the workgroup users manually to the server as normal users. The question is do they need to be assigned to the admin group which I'd rather not do. You'll need to grant permissions in Reporting Services in order to view the reports. Use Show Repo ...Show All
Visual Studio 2008 (Pre-release) store ServiceSecurityContext.Current info
This may sound strange but is it possible to save the ServiceSecurityContext.Current info so that I can retrieve it and use it later I have a scenario where the client subscribes itself via a subscription service in the host. The host resides in another machine. Later, another service from the same host tries to invoke a method from the subscriber's service. The trouble I'm having is with SSPI negotiation. When I try to invoke the client's method, I get a "SSPI negotiation failed" error. I think if I can tell the Host the client's ServiceSecurityContext.Current info, I won't be running into this problem. Thanks. I'm not sure how to find out the identities but to the best of my know ...Show All
SQL Server How do I obtain the log file for a DTSX?
Hi everyone, I'm stuck with this silly thing but I haven't idea how to obtain the path for the log file specified in a SSIS package programatically. This snippet of code works fine: Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package Dim app As New Microsoft.SqlServer.Dts.Runtime.Application Dim pkgResults As DTSExecResult pkgLocation = "C:\Documents and Settings\40990880\Mis documentos\Visual Studio 2005\Projects\Proyecto de SSIS3\Proyecto de SSIS3\ProvaPrimera.dtsx" pkg = app.LoadPackage(pkgLocation, Nothing ) pkgResults = pkg.Execute() After execution I'd like to see the log file which is allocated in the same place than DTSX file. But how Using pkg.LogProviders.Item(0). ...Show All
Software Development for Windows Vista IE7 example: Keyset does not exist error
Hi, Just trying to run the IE7 - cardspace demos on WinXP-SP2. I am able to get the security token from my personal card but during decryption of the token to get the claims, it gives an error: keyset does not exist . I have tried reinstalling the certificates but it did not help. Guys, please help me through this. Regards, Nishant It's important that I should note that you want to be extremely careful modifying the ACLs on keys. Changing the ACL on the directory is very dangerous. By doing that, you've exposed all the private keys. You should restrict the ACL changes to just the private key file for the cert you are using, and only add read permissions to the single account tha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. frame buffer and render to texture
okay i've got render to texture working, im wonderng is it possible to render to use the frame/back buffer as a render to texture so, if i want to do post effects should i: 1) some how do a frame capture or use the frame buffer as a render texture 2) do all rendering to render textures including post effects etc.. then render the final result to the frame/back buffer suggestions ...Show All
Software Development for Windows Vista MSDN Download Error 11001
Is anyone else getting Error Initiating File Transfer 110001, on MSDN Downloads Any known solutions I have been trying to downalod Vista for 2 hours now, and keep gettig this error. I would have expected MSDN to have anticipated te demand, and sorted Vista Downloads, I Guess we have to wait until after the weekend for this problem to be solved ! KevMan wrote: Yes, I'm getting connection errors as well. Got about 60% done overnight, unable to re-establish a connection this morning (tried 6 hours after the transfer was interrupted). They would have anticipated demand like you suggest (maybe underestimated though) so I assume they will be onto a resolution soon. 5 minutes after I post ...Show All
Visual C# Decompress a list of files
for my program I am trying to take a list of files in the format *.zip and decompress them. I am able to read the list from the folder and initialize decompression with GZip, but then it tells me that the magic number in the header was incorrect and that it cannot decompress it. These files come from other companies and I have no controll over how they are compressed. If GZip can only decompress its own files, what good is it Is there a way to get around this Thanks in advance, Hi, Try using SharpZipLib: http://www.icsharpcode.net/OpenSource/SharpZipLib/ Charles ...Show All
Software Development for Windows Vista Best Practices: Deploying new workflow instance
Are there any best practices for deploying new / modified workflows For example, assume that I create a state machine workflow, with version number 1.0.0.0, and I deploy it. Then my application comes along and creates instances of this workflow, and not all instances are complete. Then at some point later, I add a new activity to my workflow and make the version of the containing assembly = 1.0.1.0 and recompile the workflow assembly. How do I deploy this new version of the workflow and what happens to the still running workflows that were created under v 1.0.0.0 of the workflow assembly. When you deply version 1.0.1.0 nothing will happen to the version 1.0.0.0 workflows that are running. They wil ...Show All
SharePoint Products and Technologies Moving MySites to a different farm in BTR
Don't ask why I am trying to do this but I need to migrate a few MySites from a BTR installation to a different BTR installation so I then can upgrade them to RTM. It seems like the stsadm -backup/restore doesn't capture all the meta data and other dependencies tied in with MySites. Does anyone out there know a good way to achieve this I've tried the stsadm -export -includeusersecurity but I am getting all these "access denied" errors on export AND import. Needless to say, this is messy. Thanks, Rabbit I am getting the following error [2/27/2007 11:13:17 PM]: Progress: Initializing Import. [2/27/2007 11:14:17 PM]: Progress: Starting content import. [2/27/2007 11:14:17 PM]: Progress: D ...Show All
Windows Forms Problem with big form
I try to make big form but i cant make it bigger than 1036; 780. I set property MaximumSize to 1200;1200 but still i cant make bigger form than 1036; 780. Please help me :) I know what is Panel and where is it :) But still it dont work even when i have bigger Panel than Form i cant make bigger form than 1036; 780. Even when i set it in code not in designer it is still no more than this :/ ...Show All
