|
hi all,
I am developing a windows application where i have included code for online update of my application.When i am trying to download the files from the server, I am able to download all the files except exe file.
Could anybody tell me how to download a exe file from the server?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Maybe your virusscanner or firewall is blockig exe files. Essentially thee is no difference between different types of datafiles.
|
|
|
|
|
Hi.
What is the easiest way to synchronize two(or more) threads in the classic producer-consumer problem?
What classes and mechanisms must be used? Does .NET Thread object have features similar to Java threads? (wait, notify, notifyAll methods)
Some code snippets would certainly help.
Thanks.
|
|
|
|
|
Google is your friend.
[^]
|
|
|
|
|
hi,
i want a combo with the ok and browse button ..
browse i should browse the files and i can say ok
pls help me
with regards
prasad
|
|
|
|
|
during the form load event, say
ComboBox1.Items.Add("Ok");
ComboBox1.Items.Add("Browse");
Then use the following code
if(ComboBox1.Text=="Browse")<br />
{<br />
<br />
OpenFileDialog ofn = new OpenFileDialog();<br />
ofn.Filter = "XML Files (*.xml)|*.xml";
ofn.Title = "Type File";<br />
if (ofn.ShowDialog() == DialogResult.Cancel)<br />
goto Quit;<br />
}
i hope this helps/
Keshav Kamat
India
|
|
|
|
|
hi,keshav
u r adding a text wright and it is not working..
i think my question was not clear
i am having a datagrid and one of the column is made as a
column type=DataGridViewComboBoxColumn
and i am adding a rows like
Scenario_Designer_gridview.Rows.Add(filename);
where filename contains the list of files in a specifeid folder i am getting from folder browser.
now i want add the list of files to a that column...
i am getting error......
help me pls.
|
|
|
|
|
u mean to say that when the user clicks on the browse button, it should open a file dialog for only a fixed path, and automatically select all the files from that path, and load the names of the files in the data grid rows! right?
I will try to figure it out. It requires a little addition of code.
I will try it and let u know.
Keshav Kamat
India
|
|
|
|
|
or do u mean that every row in that datagrid will have a column that comprises of a combo box that allows u to choose a particular file?
Keshav Kamat
India
|
|
|
|
|
Hey, I wanna try to make a 3rd party prog that can control CS servs from outside (Like HLSW).
I know this is not the main forum for this, but I think that maybe someone here knows what I'm talking about and MAYBE help me (please).
Well, I could find several sites to deal with RCON cmds, and I even found a code (with a help of a friend) to connect to the server and exec RCON cmds, but however, I can't get the log.
This is a link that showed me a little about the log: http://www.hlstats.org/logs/[^]
but however, I could not understand HOW to get it.
If someone can help, PLEASE PLEASE HELP ME.
And if you have a prog\snippet for this this would help even more!
Thanks ALOT in advance.
NaNg.
|
|
|
|
|
my application work with ms access file (*.mdb) and i want share my application folder (content exe and mdb file) for clients (user in my workgroup) that clients run my application from their pc and work with database.
below is my connection that work correctly in local, but return error when run from shared folder !
private string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\servername\\sharedfolder\\MainDb.mdb; ";<br />
whats wrong?
|
|
|
|
|
Hello All,
I am using a datagrid, and I populate the datagrid, using a sqldata reader. The code is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");<br />
SqlCommand cmd=null;<br />
SqlDataReader rdr = null;<br />
conn.Open(); <br />
cmd = new SqlCommand("SELECT * FROM RDPLogViewer", conn);<br />
rdr = cmd.ExecuteReader();<br />
while (rdr.Read())<br />
{<br />
LoggerDatagrid.Rows.Add(rdr["TypeLevel"].ToString(), rdr["TimeStamp"].ToString(), rdr["SubSystem"].ToString(), rdr["ClassName"].ToString(), rdr["FunctionUsed"].ToString(), rdr["Memory"].ToString(), rdr["Statement"].ToString());<br />
}<br />
rdr.Close();<br />
conn.Close();<br />
It is working perfectly fine. Does there exist an alternative or an additional way to populate the datagrid, more fast? I just want to optimize it.
Keshav Kamat
India
|
|
|
|
|
Hi,
Why dont you try to use SqlDataAdapter to fill a data set and then attach that data set to the DataSource property of the DataGrid. I think this will save you some coding effort.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I think the way what you used to bind the grid is difficult. As coolestcoder told you can use sqldatadapter to fill one dataset. Then set the dataset as datasource to grid. One more problem what i find with your binding is,it's tough to implement paging on your example since sqldatareader is forward only. So better to go for dataset
|
|
|
|
|
HI,
Is it possible to do IPC with DOS apps using C#?
I have a 32-bit DOS App which takes in CMD line parameters. I need to get the results from this app onto a Windows Form.
The results are quite large, 25-30 MB....which is the 1. Easiest and 2. Fastest way to do it?
I'm right now looking for an easy way to do it, but a Fast way with minimum overhead would be great.
Examples and pointers would really help.
Thx
Ashish Sharma
|
|
|
|
|
is it possible to lock a file so that only a certain application has privelege to write to it? how? i want to create an application that makes use of a log file such that the log file cannot be modified outside the application. Also, this means that only those users that have access to run my application will be able to modify the log file (through the application).
thanks in advance.
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
Have the application open the file and set the sharing appropriately:
See:
* File.Open[^]
* FileShare[^]
|
|
|
|
|
Hi Colin Angus Mackay,
I think DenClancy wants that a file ( even if a simple text file ) must not be opened without a particular application. Is this possible ? What if an Admin user tries to open this file ?
Actually I wanted to restrict access to some files, even if the files are simple text files (even to admin users). I heard about something called Access Control List. Is it applicable here ? I dont know the details of ACL. If possible, please reply in details.
Thanks.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
coolestCoder wrote: Is this possible ?
As I pointed out, the application can deny others the ability to do anything but read the file. Or it can take exclusive control over the file too. See the previous links to FileShare.
coolestCoder wrote: What if an Admin user tries to open this file ?
Yes, even an administrator - Try it with a SQL Server database file. You won't be able modify it regardless of who you are logged in as because the SQL Server process has control over it. Not even someone logged on as the same user as SQL Server can access the file.
coolestCoder wrote: ctually I wanted to restrict access to some files, even if the files are simple text files (even to admin users).
You can change the permissions on a file as you need it. I'm not sure if you can lock an admin out though. If it is possible then it would only be a temporary situation as the admin would have the ability to grant themselves access again.
|
|
|
|
|
Hi!
I think the real question is how to permanently lock a file without an application that has to keep the file handle open all the time.
Sure you can set FileShare to None, but the moment your application ends anyone can access the file again.
The original poster wanted a way to deny access to a file for everybody even after the application has finished.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I think you could achieve something similar if you can create a separate user with a random password only your application knows and have your application set the access rights for the file so that only this particular user has access rights.
But an administrator could take ownership of the file and thus modify the access rights anyway...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have develop windows application which connect in device and read sdf file, but when I run this app in another PC I get error :
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
.
.
.
.
how can I solve this problem, and make application run properly in anther PC-se.
Regards.
I Love SQL
|
|
|
|
|
Blue_Boy wrote: See the end of this message for details on invoking
just-in-time (JIT) debugging
So, what did it tell you at the end of the message?
|
|
|
|
|
I got this error message
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Security.SecurityException: That assembly does not allow partially trusted callers.
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at SyncDSF.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
LinkDemand
The Zone of the assembly that failed was:
Intranet
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data.SqlServerCe
Assembly Version: 9.0.242.0
Win32 Version: 3.0.5300.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.SqlServerCe/9.0.242.0__89845dcd8080cc91/System.Data.SqlServerCe.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
WindowsBase
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.0 (vista_rtm_wcp.061020-1904)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitdebugging="true">
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I Love SQL
|
|
|
|
|
Blue_Boy wrote: ************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
And have you followed these instructions?
Following these instructions will help you track the problem you are having, you can then fix it.
|
|
|
|