|
Homework?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
just study the pattern in which these strings are to be written u'll definately get the answer
Amit
|
|
|
|
|
Hello all,
I'm using a webclient class to download a file from some website
so my code is
Webclient webobj=new Webclient();
webobj.DownloadFile("http://www.codeproject.com/into/stuff/cp_bg_black1024.gif",@"c:\MyFiles");
the problem is that it gives me an exception stating i dont have access rights to my folder "c:\MyFiles" i tried enabling access rights to this folder to everyone giving fullcontrol but yet its not working.
Can anyone suggest me a solution to this.does anyone know whats causing the problem.
the detailed error is as follows
System.Net.WebException: An exception occurred during a WebClient request. ---> System.UnauthorizedAccessException: Access to the path 'C:\mydata' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at Autdownloadingfile.Form1.btnAutoDwnld_Click(Object sender, EventArgs e) in C:\downloadingfile\Form1.cs:line 33
AMIT
|
|
|
|
|
Hi,
I'm working on a plugin for Outlook, which will allow the user to save their emails into a central repository where it will be accessible from other places, such as a web page. And I'm pondering in what format I should save the emails. Currently I'm using the .msg file format, but there are some problems with displaying it in a web page.
Does anyone have any experience with doing this? I tried saving a mail message as HTML, but apparently that isn't supported unless the mail itself was originally in HTML format.
This is an example of the way I'm doing it currently:
MailMessage msg = ...
String strFilePath = Path.GetTempFileName( );<br />
msg.SaveAs( strFilePath, OlSaveAsType.olMSG );
Simply changing from olMSG to olHTML wasn't working, at least not in all cases.
But as I said, using the MSG file format would be OK if the mail would then display properly from a web page, but there does not seem to be a universal way to open .msg files in a web browser. Or is there? What mime type should I use for .msg files, in order to display properly in web pages?
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
How can I calculate number of executable lines only of a C# source code?
Essam
|
|
|
|
|
A quick google search returned this[^] item.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: A quick google search returned this item.
Where can one find this quick Google?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc Pattyn wrote: Where can one find this quick Google?
Forsooth sirra, it doth depend on your network connection. Yea verily.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have a messagequeue, that was created from a VB script. My C# code has to change the permissions on that queue, giving Domain Admins full control, and revoking access for the current user (which was the creator of the queue).
After running the code, Domain Admins has full control, but the current user (who is a member of Domain admins) gets an access denied when viewing the queue properties via MMC. The user can delete the queue via MMC however.
If I let the code only add Domain Admins, and I remove the current user ACE using MMC, the user can still check the queue properties. This is afaik the expected behaviour.
I am using queue.SetPermissions with entrytype AccessControlEntryType.Revoke. Documentation says this will remove ACE's for this user (both denies and allows).
Why can't the user view queue permissions (yet delete the queue is allowed) when I revoke the user's permissions, while the user is a Domain Admin (which has full control)?
|
|
|
|
|
How can i get a list of class methods from .cs file?
Essam
|
|
|
|
|
Is this from the actual .cs file or from a class when an application is running. The answer is different, depending on the scenario - in a running application, you would use
MethodInfo[] methods = typeof(MyClass).GetMethods(); In the .cs case, you either need to parse the file manually or use Visual Studio and the EnvDTE classes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I need to get all methods from a class in a file (not in rum time), i think that i should use CodeDom namespace for that, but i don't know how o use it for this purpose.
if i should use parsing, how can i distinguish between methods and declairing variables
Essam
|
|
|
|
|
Does this[^] help you any?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dear Pete,
thank you for your interest, but i need to make an application seperate from VS, i don't need it to be an add-in.
Essam
|
|
|
|
|
Hi,
I want to calculate the CPU percentage of processes in a dual core processor system. Currently the code is developed in C# using PerformanceCounter and it is capturing the values accurately for a single core processor.The same code when exceuted on a dual core processor returns zero value. Can anyone throw lights on this issue.
Appreciate your timely help
Thanks,
Lakshmi
|
|
|
|
|
Hi,
seems to me one of the following holds true:
- you perform the measurement with a separate thread that lacks the necessary synchronization
to make it wait until the actual work is done;
- you have a bug in the measurement code.
You might consider showing us the code...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Dear all,
I m interested in developling some king of pos software that uses equipment such as barcode readers, cash drawers etc. But if possible I want to make it hadware manufacturer independent.
Is there some package that is available that allows me to do this?
Thanks a lot,
Chris Farrugia
|
|
|
|
|
Have a read of this[^] to get an idea of how Microsoft handle POS. This should give you some idea as to what is possible.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
ChrisFarrugia wrote: Is there some package that is available that allows me to do this?
I've done a lot of research into PoS in the past (admittedly getting on for 10 years ago now... but probably still relevant).
The problem on the hardware (cashdraws, barcode scanners, receipt printers) side of things is that there aren't many standards governing how these devices should work - each manufacturer decides which control character(s) open the draw, activate the scanner, starts the printer etc. Sometimes you can get lucky and find Windows driver support, but this is the exception rather than the norm. So basically you either end up supporting just a few specific devices, or spend the rest of your life coding in support for every device that comes along.
Of the two options, there are compelling reasons to go for the first:
1) Regardless of whether you want to or not, you will become both a hardware and software vendor because no retailer will touch you if they have to manage multiple contracts/companies for both hardware and software
2) As a hardware vendor you'll need to cut costs by buying in as much bulk as possible - impossible to do if you support too many products
3) You'll never have the resources to cater for every device going
There are some other concerns that you should consider:
- Most commercial products from the big players (IBM/HP etc.) are geared towards the big (or wanting to become big) retailers - think Walmart, Tesco, Toys R Us, Borders etc. You'd think this would leave you with a huge customer base of small to medium sized businesses. Unfortunately it doesn't because a)Most small businesses - say one or two outlets - don't need a sophisticated PoS system and b)Your product will be (comparitively) very expensive which will be hard for smaller businesses to justify.
- There is no such thing as a one-size fits all PoS system, even within the same sector. I've worked for a number of Bookstores (as an Area Manager) and every single one had different procedures and processes for handling the same tasks. Sure it's possible to develop flexible software, but consider how many resources you'd need to throw at such a product and then weigh that up against how much you could make.
-Medium sized businesses (which in reality will be your potential customer base) also create their own problems for you:
a) Medium sized companies looking to get big won't touch you unless you have a proven track record.
b) Consider the amount of support "traffic" that a company of 20 outlets will generate, and the kind of resources you'll need in place to cope with it.
c) Retailing moves at a fair old pace and your product must be able to at least move at that pace, but ideally will anticpate change ahead of time. If it doesn't your product will be shown the door very quickly.
So all doom and gloom then? Well not necessarily, but first of all if you want to succeed you should first abandon the idea of rolling your own solution from scratch and become an implementor - say of the Dynamics products which Pete pointed out. What I will say is that 10 years ago when I went down the same route as you I soon realised that the risks were significant and the potential rewards relatively tiny.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Thank you very much for your detailed reply and i totally agree with you! So it seems there are no standards that govern pos equipments and therefore it is quite difficult to make a software compatible with the majority of them.
Thanks a lot once again,
Chris
|
|
|
|
|
Hello Chris,
You can get started in POS using the following
POS for .NET 1.11 from Microsoft.
They are trying to reduce the problem of different hardware drivers/manufacturers as mentioned
by using service objects. Epson and a few others support OPOS for .NET and even give
examples in C#, which is nice...
Good Luck
Mick Curley
|
|
|
|
|
Hello,
I am building a composite control. The problem occurs in design-time. When i use a skin file it doesn't care about it in design-time. bu in run-time it use skin file.
Any solution would be most appreciated.
|
|
|
|
|
Hi,
I've Win app that communicates with a web page using Http via WebRequest.Create(site); etc...
1. How can I send a file to web server using Post method ? (It's Windows app, not web!!)
2. When communicating with web server, I get sometimes "System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine" . I know It has something to do with .NET security settings. How can I tunrn it off ? (I'm not concerned about security since I've created the web site I'm connected to...)
3. I also use Ftp protocol for sending files and I'm getting strange Errors there too (like ftp command unrecognized etc...) and me feeling is that it has to be something with security too.
thanx for answer
zilo
|
|
|
|
|
hi
you can upload , download files with "WebClient" class in .net.
such as follow :
WebClient client = new WebClient();
client.UploadFile(...)
|
|
|
|
|
Hi guys,
i want to save the user input as time in the sql server. bud the problem is that it also saves the date. how can i save only the time, without date? i tried the datandtime and smalldatetime.
thanx
|
|
|
|