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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

How Can i use the key file Generated by RSACryptoServiceProvider to encrypt with php?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF
 

I need to be able to encrypt data in PHP using a public key generate by .NET(RSACryptoServiceProvider).  I will then decrypt the data later in C# using the private key.

 

Code Snippet

<RSAKeyValue><Modulus>xU5JyaPNDKXI/h/uo5Vk89wZSz3zsB1+c+1IMYIQa+mCmuRCRPuoBI7ODSV2ndP6grfhdrWEzhpZtkI3SThbBh/3t+tfZ2PF8Iyv9ECN07V64nPCiJGhAnfENE+J9UD9Kw5czXHgZcBbpM5N0VfXmLSleaS65DDoNPtoStVy7ss=</Modulus><Exponent>AQAB</Exponent><P>4ScAjVrPZii/6lICAP2yDQiNEmNL74+5AcxNVDI0IombfDPIygrqEWmuDu0pngApQak7XnEnLbaDChILFiHPZQ==</P><Q>4FaYlse+cjrlPD/jk+GsTJeuP7yuQx8ztjVnQWVh6GKQP+uk1dAl6kcZOfLNR6LWwE3CSygt8PthTEw96Zbabw==</Q><DP>XvXtNLE9UjATqYeHEtXtV7Pok/3PVC3A8PIzFzTJaluxeXP51sU9rbRt1hvO9rXIsMnooU+GH7Cfmgq8JEyERQ==</DP><DQ>HXkC/vwq9xLpvuqd2XXSjxV2XQVK16Knxo5pjFvnawJX9S3eMADymj7Q/534firUj9snZXxX3MsJ015I3AFnnQ==</DQ><InverseQ>AM0fVCE3n2FKf2zb3CcDEge1Ko35VvMEL+LXgR87QwO2HScZSuLevGLi2SSAkB1vu8RSNzB028SZReeOZWnq4Q==</InverseQ><D>fI+GKdRNOTTYhQZnw8Im74T+OvArjf2wvUMJlqfD8jyDBYIhDCfL1MTK9KW4Er+moSuxHR5Pb0ZXaKa4/HKlk0aJ1jB2C+jg7zTSuPRNuS16BpVHaJYsQurCwZwElXMum+GxeXK/h3wXWq5HwebjqZr0aLUMZKRcweDPRoVFiRE=</D></RSAKeyValue>


View Complete Post


More Related Resource Links

SQL Agent Jobstep output file contains automatically generated header

  
Hi,   I've created a stored procedure that creates a script to create a number of objects within the database (based on what existing objects are in the database).  From Management Studio, this works fine, and the output is exactly as I want it.   I'm now trying to create a job that will execute this stored procedure, and deposit the results into a file somewhere on the server.  When the job runs, the script is created in the correct place and is essentially ok.   However, there are a couple of questions I'd like to ask.   Why does SQL Server Agent put a header at the top of the output file?  I was hoping to be able to use that output file 'as is' and execute it automatically to recreate my objects when required.  (Obviously, I can manually remove the header, but this is an inconvenience in this situation).  How do I stop it?   Also, when executed from SSMS, the output is correctly line-spaced.  But, the output from the scheduled job adds an extra line between each line of text, which is, again, inconvenient.  Why does it do this, and how can I prevent this (again, without manually editting the output)?   Any thoughts and help greatly appreciated.   Cheers Simon

how to Encrypt my Access DB File ?

  
Hello , i have an access DB in my Application i want to close it and prevent anyone from opening the db file directly  how can i hide  and make password for it in order to increase Security ?  also i want to ask about if i used Access 2007 in my application , am i have to install it too when i deliver application to user or not ?Kareem Naguib

Saving a generated text file

  
 I have an application that collects data and puts it in a text file.  When the data collection is complete the UI offers the user the opportunity to save or open the text file with a dialog box using this code: Response.Clear(); Response.ClearHeaders(); Response.AppendHeader("Content-Disposition", "attachment; filename=" + outputFilename + ";"); Response.Cache.SetCacheability(HttpCacheability.Private); Response.ContentType = "text/plain"; Response.WriteFile(outputFilePath + outputFilename); Response.End(); Response.Flush(); The problem is this.  The starting interface allows the user to select a large number of data gathering points.  If all are selected the program will run for about 90 minutes.  Sometimes it will present the dialog box, sometimes not.  Sometimes it will present the dialog box, but regardless of whether the user selects save or open, the dialog box simply disappears, and the data text file is neither displayed nor saved to the client system. When fewer data gather points are selected, and the program runs for 15 minutes or less, there is no problem.  The resulting data can be saved or displayed. The actual data text file is initially stored in the temporary path directory on the web server.  On at least one occasion, where the dialog box disappeared, I was able to

Create zip file of dyanamicaly generated Excel sheet in c#

  
hi all,   I want to give product details in excel sheet but that excel sheet should be zipped and then pass it to user. I know how to create excel sheet from database but  how to pass that excel sheet into folder and then zip that folder..?   plz giv me any solution 

Has anyone tried to import an XML file generated by PPT into SQL?

  
I'm trying to take the XML that is generated by a "Save As" from PPT 2007 and import that into SQL. My goal is to be able to capture the appropriate records for the presentation, slides, and images and have them stored and accessible. When I try follow the directions found here: http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx I run into a problem that the XML contains multiple namespaces. Any help would be greatly appreciated!

Has anyone tried to import an XML file generated by PPT into SQL?

  
I'm trying to take the XML that is generated by a "Save As" from PPT 2007 and import that into SQL. My goal is to be able to capture the appropriate records for the presentation, slides, and images and have them stored and accessible. When I try follow the directions found here: http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx I run into a problem that the XML contains multiple namespaces. Any help would be greatly appreciated!

remove stack trace , Additional Info, from log file

  

i am using belowcode in web.config 

<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
    <listeners>
      <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName=".\Logs\jeejix_error.log" footer="------------Error End----------------------------" formatter="Text Formatter" header="---------Error Start-------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="50" />
    </listeners>
    <formatters>
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken

Save generated xlsx file in document library

  

I have created a webpart that generates a xlsx fil with data from some lists on a sharepoint 2010 site using open xml 2.0.

So far I save the generated xlsx file on the servers harddrive just for test purpose. What I want is to save the generated xlsx file to a document library, but I feel it is a little stupid to save the file on the harddrive and afterwards upload it to the document library.

Can't I skip the "save on harddrive"-step somehow?

 

//Jesper

 


When i export a MS Excel file generated By SSRS 2008 i'm not able to change the sheet name (Sheet 1

  
When i export a MS Excel file generated By SSRS 2008 i'm not able to change the sheet name (Sheet 1,Sheet 2,Sheet 3) dynamically.So Please try to give me a solution.

When i export a MS Excel file generated By SSRS 2008 i'm not able to change the sheet name (Sheet 1

  

 

When i export a MS Excel file generated By SSRS 2008 i'm not able to change the sheet name (Sheet 1,Sheet 2,Sheet 3) dyanamically.Sp Please try to give me a solution.


Is the executable file generated by compiler a Managed code or Unmanaged code ?

  

Hi,

when we compile our vb.net or c#.net code (say in a simple console application) then in bin\Debug folder a .exe file is created.Is that a managed code? when i directly execute this file,will this target CLR ? or will it directly run on OS ?

Why there is ConsoleApplication1.vshost.exe.manifest files created in that folder ?

What is .pdb file ?

That executable file is also created in obj\Debug folder .Why ?


15 GB log file generated from SharePoint

  

Hello:

Last Friday, I installed Windows Sharepoint Services 3.0 (WSS) on Windows Server 2008.  This morning (Monday), I noticed that the C drive has only 502 KB of free space.  I went through the C drive and found a 15 GB log file in the following directory:

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\LOGS

This, apparently, got created at 7:44PM last Friday night somehow.  I, just now, deleted it as it was too big to open in Notepad.  The server now has 14.2 GB of free space on the C drive. 

Since the C drive is only a 30GB drive, we can't afford for log files of this size to get created again.

I checked Event Viewer and there were no events leading to a cause for this. 

Does anyone know why this would have happened?  Is there a way of preventing this from happening, again?  Is there a way of automatically purging these log files?

In light of this, the client would like for the Temp, tmp, and all log file locations moved off of the C drive and onto the D drive.  Is there a way to do so without uninstalling and reinstalling WSS onto the D drive?

Are there really any issues (aside from log file creation!) with installing Windows Sharepoint Service onto the C drive?

childofthe1980s


Encrypt a File with SSIS using PGP

  

I want to do the following:

1.  Look at a field (named Encrypt) in a table in the database.
     a.  If the field is set to TRUE then encrypt a file
     b.  If the field is set to FALSE do not encrypt

Also, I want to pass the filename to the ExecuteProcessTask


Need a way to encrypt a file before upload to the server

  

Hi Everyone,

Is there a way to encrypt a file at the client level before it is uploaded to a server? (and decrypt it when it comes back from the server).

I realize there are server apps for this as well but my host doesn't offer it in it's shared hosting plans.

Thanks,

J



C# reading Java/Php/SOAP service, WSDL generated file missing some namespace information

  
I'm trying to use a Web Service, which I believe is Java/php/SOAP, using C#.
I can connect and send fine, but the results, which are an array of information,
is null. The return is not instant, and I can get back errors.
I believe the problem is in the WSDL translation. The actual response coming back
does not line up with the WSDL generated code in reguards to namespaces. In
perticular, 'getCategoryTreeResponse' & 'getCategoryTreeResult' do not show up 
in the generated file.
I'm quite sure the WSDL file provided is poorly written but I have no control
over it. WSDL.exe only works when I pass a saved copy of the web service's
provided WSDL information due to the way it is called.
http://xxx.com/soap.php?target=categories&w

Compiler error in a generated code file?

  

So one of my views refuses to display, instead throwing up an error about an unreferenced assembly in a generated code file.

Here's the controller action:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using CindySanabria.Domain;
using System.Diagnostics;

namespace CindySanabria.Controllers
{
    public class ProfileController : Controller
    {
        private IMembersRepository _membersRepo;

        public ProfileController(IMembersRepository repo)
        {
            Debug.WriteLine("Constructing ProfileController");
            this._membersRepo = repo;
        }

        //
        // GET: /Profile/Create
        [Authorize]
        public ActionResult Create()
        {
            Debug.WriteLine("Running Create action");
            return View();
        }
    }
}

And here's the view:

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CindySanabria.Domain.Member>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create Profile
</asp:Content>

<asp:Content ID="Content2" ContentPla

How to sign a dynamically generated Pdf file?

  

Hi,

How to sign a dynamically generated PDF file?

Using Itextsharp .

Without external certificate, can we sign a document?

 Request your speedy response


Categories: 
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