|
i have moved the application to another machine, i moved the database successfully but the problem that when i open the report it displays the last query before moving i tried to use
rptcust.SetDatabaseLogon(UserName,PassWord,ServerName,DataBase);
but no changes happened and the new added records does not appear in the report.
|
|
|
|
|
I think u to have once again set the connection for ur database in the report design which would propably work.
TRY TRY TRY.....
|
|
|
|
|
vamsimohan21 wrote: set the connection for ur database in the report design
of course it will work. but it is not a solution
|
|
|
|
|
Hi,
I'm getting a strange error when trying to run my form with DirectX on another computer (on my own it's fine). I get:
Additional information: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
This problem has popped up ever since I added a panel that uses DirectX. To see if it could be something I did, I ran a simple, beginner directx file (from Tom Miller's Managed DirectX 9 book) on my computer and then copied those files to the other computer, and it again didn't work, although this time giving me the error:
An unhandled exception of type 'System.Security.SecurityException' occurred in Lights.exe
Additional information: Security error.
I then added messageboxes to see how far the thing ran before having issues. It didn't go far. I start with the usual Main() entry point:
Application.Run(new Tabs());
Then
private Tabs()<br />
{<br />
MessageBox.Show("begin");<br />
InitializeComponent();<br />
panel1.Visible = false;<br />
tabControl1.Visible = true;<br />
...}
Then under
InitializeComponent()<br />
{<br />
MessageBox.Show("start-ic");<br />
...<br />
}
When running the program, the "begin" messagebox appears ("start-ic" doesn't), and a Just-In-Time Debugger pops up. I run a new instance of Visual Studio .NET, the line after InitializeComponent() gets the yellow highlighting, and the System.Security.SecurityException warning comes up (the long version from above).
I've found info from people having the same exception as my first one, but they're all getting those errors when trying to connect to a database or the web which I definitely don't do.
Any ideas why this could be happening? It works fine on another computer if I create a plain form.
Thanks for any help/ideas!!!
Mel
-- modified at 16:31 Wednesday 12th April, 2006
|
|
|
|
|
1. Make sure the Managed DirectX runtime is installed on the target machine.
2. Make sure you're not running the application from a network share.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hi!
You can set .NET security settings from a control panel: Microsoft .NET Framework 1.1/2.0 Wizards.
Could it be that you're running your program from a non-local disk? In that case, the framework won't allow the code to do everything locally running code is allowed to do. But you can adjust the permissions using the afforementioned control panel.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks! That worked.
Mel
|
|
|
|
|
Hi, I'm building a chat program using Asyncronous Sockets, but want to secure or encrypt the transfer between client and server. At the moment I'm using TcpListenter and TcpClient sockets and all messages are routed through the server.
Can anyone advise on the best way to secure the transfer simply and efficiently (so it doesn't degrade speed too much)?
I'm also looking into authentication (login) between client/server and wondered if there is any information on how to implement this in c#. I've initially looked at using MD5, but is there any better ways for secure login...?
Any help appreciated!
|
|
|
|
|
Have you looked into the System.Security.Cryptography namespace? There are several encryption algorithms that do most of the work for you that can be useful in encrypting data. There are also some encrypted stream objects you could use for encrypting data between client and server.
|
|
|
|
|
Thanks very much, I'll look into those. Would you recommend any in specific? I'm hoping to not compromise in speed, as the messages are already routed through the server.
|
|
|
|
|
Any cryptograhpy is pure overhead. There will be a speed hit as you have to encrypt it on one end and decrypt it on the other end. But generally speaking, it shouldn't be too much of a performance hit. Best way to know is to try some out and see the results.
|
|
|
|
|
Lastly, in your view, is it relatively easy to implement an encrypted network stream?
Thanks for all the help Judah, don't really have time to test due to deadlines, but will give it a go.
|
|
|
|
|
I would venture a guess and say yes, since it's still a System.IO.Stream underneath, with the same familiar methods. But it really depends on your surrounding code; if lots of code is expecting it to act one way, you're going to have to make lots of changes. OTOH, if your code is isolated to the point where only the sending and receiving methods are expecting a regular old stream, you'll only need to change it in those 2 places.
|
|
|
|
|
I am puzzled on how to proceede with this issue! I have a text file that has information that I would like to extract out and save to another file.
I am able to read the file and write the file I am having a hard time figureing out how to extract the data I want out.
Any help would be greatly appreciated
Thank you
Hella
|
|
|
|
|
If it's a text file,
string textInFile = System.IO.File.ReadAllText("thefile.txt");
System.IO.File.WriteAllText(textInFile);
|
|
|
|
|
Sorry, I should have clearified a bit more...
I have no problem reading the file and writing the file! The only thing is I don't want to print out all the contents of the file just specific text in the text file.
From my example file I would want to get the Time and this ftp: 6384000 bytes sent in 84.73Seconds 75.35Kbytes/sec.
Once I figure out how to parse out this info I can acomplish the rest. I am pretty sure I have to use an array... But array's are a little tricky for me.
The text file I would like to pick a part!
05:29 PM
ftp> Connected to 192.168.100.115.
open 192.168.100.115
220 Connected to Intermec IFTP server. Version 2.11.
User (192.168.100.115:(none)):
331 Password required!
230-===============================
Intermec FTP server ready!
Version 2.11. WINCE
0010400D7B4C 36310500129 730
Binary transfer mode only!
===============================
230 Logon successful.
ftp> Local directory now C:\Documents and Settings\burlagr\Desktop\FTP_Transfer\Files.
ftp> lcd "C:\Documents and Settings\burlagr\Desktop\FTP_Transfer\Files"
cd "Flash File Store"
250 Current directory changed to "/Flash File Store/".
ftp> binary
200 Type set to I.
ftp> Hash mark printing On ftp: (2048 bytes/hash mark) .
ftp> hash
ftp>
mput test88.txt
mput test88.txt? yes
200 Port command successful.
150 STOR: Command accepted!
########################################################################################################################################################################################################################################################################################################################################################################################################
226 Transfer Complete.
ftp: 6384000 bytes sent in 84.73Seconds 75.35Kbytes/sec.
ftp> ftp>
|
|
|
|
|
|
Unfortunatley the data is not a .csv file... But would it be easier if I just concerted the .txt file over to a csv file? So there is whitespace that I have to deal with.
|
|
|
|
|
The Regex pattern could get as detailed as you like.
Untested:
<br />
using (StreamReader sr = new StreamReader("File.txt")) <br />
{<br />
string line;<br />
while ((line = sr.ReadLine()) != null) <br />
{<br />
if Regex.IsMatch(line, @"\d+ bytes sent")<br />
Console.WriteLine(line);<br />
}<br />
}<br />
- Bitwise
|
|
|
|
|
Thanks for all the help Bitwise...... This seems to easy though. Is this the bestway to implement this?
|
|
|
|
|
I have a server which updates programs on our local network, informs of notifications, etc... The problem is that after so long it will "lock up" and stop accepting connections. I have connected/disconnected clients and tested everywhere for a solution to the problem. There is actually a series of about 6 servers on different ports, and all of them quit accepting at once. The MainSocket is using Socket.BeginAccept and waiting for connections, then passes them off to a data structure I created to maintain the connections/user info/etc. Is there a certain period of "idle time" when the Framework aborts that thread? It seems like if that were the case, however, you wouldnt even be able to connect to the server. As it is, you can get a connection, you just cant communicate. I know without seeing the code it may be hard to determine a solution, but Im not sure exactly what the problem is. Any thoughts or comments would be appreciated...
Aaron
|
|
|
|
|
did you say that all disconnect or stop accepting connections at the same time? Have you tried running the server and client on your machine to see if they stay up and running?
What about traping the socket errors are they reporting anything?
T
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Yes, that is how I tested them to get the bugs out (On My Machine). It takes a good 2 days or so before they stop accepting connections, however, and debugging for that long really isnt feasible, because it doesnt always happen. It does report errors, but the error logs dont report anything unusual, client connected/disconnected, updating database, etc. Nothing that should clog the server like that. Thanks...
Aaron
|
|
|
|
|
How are you running this? Windows service? ASP.NET? Windows app? Command line? Different/same PC?
Maybe the hardware is going into power saving mode...
|
|
|
|
|
I created a tabbed app that has a number of checkboxes on the second tab. I'm using currency manager to keep track of the number of records that are currently in the DB as well as adding, deleting records. I also am using data view to sort my records based on what the end user is looking for.
When I go to add a new record and click on the second tab, I get a DBNull exception.
I've made sure that the fields in the database are set to not allow nulls, and with a default value of zero.
I want to do a check to make sure that if the field is null then the binded field = false?
Or is there a better way to do this?
Thanks
Tom Wright
tawright915@yahoo.com
-- modified at 15:13 Wednesday 12th April, 2006
|
|
|
|