|
gopal_Pandey wrote: this is really urgent one
It's always urgent. Still kudos for not putting urgent in your post title.
Anyway - your problem here is that the user that the website is running under doesn't have access to the file. This is down to permission restrictions - so you need to allow the website user (that's the user identity the website runs under) read/write permissions on the relevant directory.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Please don't email me direct. Doing this prevents others from following the thread.
Anyway - to answer your question, I have already given you a hint as to what to do. Check the permissions of the directory and see whether or not the ASP worker process has read/write access to it. I don't know how much more explicit I can be without actually coming round and doing it for you.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi everyone,
Sorry for that Email Mr Pete O'Hanlon,
I got your answers but all of you telling me only one solution which i have solved out i have given access to that file and also allowed the whole files to access rights what u have told me but it doesn't solve any problems....
I am using a trial version which is not registered of Adobe Indesign CS2.....
Please think again about this and reply me
i am waiting for your answers.......
bye........
|
|
|
|
|
Hi Friends,
Using .NET 2.0 how do I extract .zip file? It seems GZipStream does not go well. Is there any other class in .NET where in can be used to extract .zip file?
Thanx in advance.
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
|
Thanx for the links but I am suppose to use microsoft class liabraries only.
Regards,
Vipul Mehta
|
|
|
|
|
Hi,
In the java.utils.zip include tools that should help JAVA developers in .NET
But, one of the grate features there, that i can't understand why it isn't part of the common BCL is the zip file support.
First, add vjslib.dll and vjslibcw.dll as reference.
If you can't find them, ther are in J# Package: Here[^].
Use ZipFile Class to zip and unzip files.
|
|
|
|
|
Hi,
After implementing the following logic I get "The magic number in GZip header is not correct. Make sure you are passing in a GZip stream." error
string sourceFile = @"C:\Test\MyDocs.zip";
string destinationFile = @"C:\Test";
if (File.Exists(sourceFile) == false)
{
return;
}
FileStream sourceStream = null;
FileStream destinationStream = null;
GZipStream decompressedStream = null;
byte[] quartetBuffer;
int position;
int checkLength;
byte[] buffer;
try
{
sourceStream = new FileStream(sourceFile, FileMode.Open);
decompressedStream = new GZipStream(sourceStream, CompressionMode.Decompress, true);
quartetBuffer = new Byte[4];
position = Convert.ToInt32(sourceStream.Length) - 4;
sourceStream.Position = position;
sourceStream.Read(quartetBuffer, 0, quartetBuffer.Length);
sourceStream.Position = 0;
checkLength = BitConverter.ToInt32(quartetBuffer, 0);
buffer = new byte[checkLength + 100];
int offset = 0;
int total = 0;
while (true)
{
int bytesRead;
bytesRead = decompressedStream.Read(buffer, offset, 100);
if (bytesRead == 0)
{
break;
}
else
{
offset += bytesRead;
total += bytesRead;
}
}
// Now write everything to the destination file
destinationStream = new FileStream(destinationFile, FileMode.Create);
destinationStream.Write(buffer, 0, total);
// and flush everyhting to clean out the buffer
destinationStream.Flush();
}
catch (Exception ex)
{
}
finally
{
// Make sure we allways close all streams
if (sourceStream != null)
{
sourceStream.Close();
}
if (decompressedStream != null)
{
decompressedStream.Close();
}
if (destinationStream != null)
{
destinationStream.Close();
}
}
Can any body help me out?
Regards,
Vipul Mehta
|
|
|
|
|
Are you absolutely sure your .zip file is in gzip format? The gzip format has a header and the GZipStream class accounts for this. But, if your .zip file is not in gzip format, the gzip decompression will not work.
Your .zip file may have been created with the DEFLATE compression method in which case you need to use the DeflateStream class.
Simply substitute GZipStream with DeflateStream and see what happens...
|
|
|
|
|
I am trying to unzip an container .zip file (it contains many files & folder within that). My app. downloads this .zip file from an http URL of an web site & then tries to unzip it.
After implementing DeflateStream class, it shows me following error:
"Block length does not match with its complement"
Regards,
Vipul Mehta
|
|
|
|
|
ZIP is not GZip. They are different formats. GZip compresses a single stream of bytes, ZIP is a container for multiple files each of which can be compressed a different way (although conventionally the Deflate algorithm is used, unless that gives no compression in which case the original file is simply stored instead).
The ZIP format is documented[^]. Parsing it is actually pretty easy.
SharpZipLib does work but I've found it pretty slow.
The GZipStream and DeflateStream classes are primarily intended for the web support e.g. HttpWebRequest, because the HTTP protocol allows responses to be compressed. Java has ZIP classes because its class library format, JAR, is simply a renamed ZIP file. (An individual class's bytecode is stored in a .class file, early versions of Java did not allow you to bundle these up into a package, later versions added the Java ARchive, JAR, format.)
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
Hello,
I have code in VC++ with MFC.Can I develop the same code in .NET framework.
What major changes will be required in the VC++ code.
Prithaa
|
|
|
|
|
Well - if you're dealing entirely with the .NET framework, then pretty much every bit of your MFC code is going to change. If it works as MFC, why change it?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
If you are developing new code, why waste time with a 15 year old API like MFC.
If you are trying to use existing MFC code, you can host your MFC code in WPF through the interop mechanisms.
Only you can weigh the cost between salvaging MFC code or re-writing it in Windows Forms or WPF.
|
|
|
|
|
Hello,
Thanks for your support.
Where will I find the details of hosting MFC code in WPF ?
Can you give me the link.
Prithaa
|
|
|
|
|
I'm a book worm, myself...
Windows Presentation Foundation Unleashed - Adam Nathan
Essential Windows Presentation Foundation - Chris Anderson
|
|
|
|
|
Is there some utility that can scan an assembly and spit out any methods that are being used that are not .netcf compliant?
Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt
|
|
|
|
|
netcf means .NET Compact Framework? And by compliant you mean API's being used?
Could you use the decompiler utilities to produce code, then put it in a CF project and compile it?
|
|
|
|
|
Sorry yes, it's the .net compact framework for windows mobile devices.
I have the code, it's my own code however it was never written with .net cf in mind and a customer of ours wants to use our developers api to write some kind of net cf utility or add-on.
I just wanted something that could quickly scan through it and show all the uses of methods etc that were not .netcf compliant. I already know it isn't even fundamental things like Decimal.TryParse are not supported so no question about it working or not, I just wanted details I could provide to the guy (and out of my own curiosity) without having to install all that windows mobile mumbo jumbo for visual studio.
Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt
|
|
|
|
|
Oh, I was way off track, sorry.
|
|
|
|
|
Fastest way to do it.. honestly.. very low tech.
Create a Smart Device project, drop all your files in, and try to compile. You'll immediately get a nice long list of all the things the CF compiler doesn't recognize
I've done this a couple of times. Will this serve your purpose?
Edit:
Oh, I missed this part:
without having to install all that windows mobile mumbo jumbo for visual studio.
Hmmm.. yes this should still work. I don't think you need to install the Windows Mobile SDK to get smart device projects. I could be wrong, it's been so long since I installed it..
"If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual."
- Frank Herbert
|
|
|
|
|
I have a specialized legacy application that was written for XP using VS2003 and .NET 2.0. There are only 2 users of this app, and it's worked great up until they got a new laptop with Vista (and sometime in the past year they've moved out of state, so I'm having to troubleshoot this via email).
What the program does is creates an RTF document (report) and saves it in a subdirectory of where the program currently is, and then prompts whether or not they want to view it. If they do, I use: Process::Start(filename); which has previously opened the document in the default viewer (MS Word). There is no user interaction in creating the filename, and the program checks that it's a valid string.
Here's the exception text I get:
System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
at LoanServicing.edit_payment.b_reconciliation_Click(Object sender, EventArgs e)
I had the user check to make sure the file was getting created and named correctly, and it is; they can open it by doubleclicking the file icon.
The MSDN documentation seems to indicate that this use should work:
(from the C# example at: http://msdn2.microsoft.com/en-us/library/sxf2saat.aspx)
// The following call to Start succeeds.
Process.Start(path + "Text.txt");
Running the program as Administrator gives the same exception. Any idea what might be the problem here? I've tried everything I can think of...
Thanks!
|
|
|
|
|
You should be keeping track of the full path of the file your writing. If it's in the Program Files folder you can get the path to that with Application.StartupPath . It's always good practice to use fully qualified path names whenever you're working with files. Never assume you know what the "current directory" is going to be at any time.
|
|
|
|
|
This whole mess started out with a conversion from PHP to C#. In the PHP code, PHP's internal OpenSSL module works fine when verifying the signature. However, when using external OpenSSL binaries to perform the same function, neither the PHP code nor the C# code verifies the signature.
Due to that particular problem, I started looking around to see if I could verify an SSL signature via .Net. I have the data to verify with (as a string), the public key (in a file), and the signature (in a file). I've looked for more than a week on Google trying to find something less vague than "look up the signature formatter" (something someone here said). None of the stuff I've found to date makes any sense and assumes I'm already familiar with the crypto stuff in .Net.
All I need is to know if the signature is valid.
I assume that the signatures generated by openSSL code are the same as would be generated by SSL, and SHA1 is the same everywhere, so I should be able to verify this signature with what the three items I have, and I should be able to do it in .Net 2.0.
Can someone PLEASE give me a solid direction to follow so that I don't have to start converting openssl to C#?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Can someone PLEASE give me a solid direction to follow
John SSL in IIS is very simple. Perhaps you can separate the SSL from the Authentication aspect of your system, is that possible?
|
|
|
|