Answer Questions
preethi_rjs Setup Creation Problem 'donetfx publisher not verified'
I want to create a setup, and include dotnetfx as part of my application and when any system need dotnexfx then it is installed otherwise just my application be installed, for that i practised alot but faced a problem which is when i am creating setup or publising my application and Including prerequests (windows Installer and dotnetfx) during installation of dotnetfx i am encountring an error which is "the publisher of dotnetfx is not verified ", what i to do that setup dont give these type of errors and my setup do not download prerequest from vendor website thanks The linkes to which you refered me i practised but it is same as i was doing before, kinldy create setup on your own system and then install on ot ...Show All
Billy Porter Debugging Tools
Hi I'm new to the C# area. Please can someone let me know what tools i can use to monitor what resources the application uses, what class/procedures are using up a lot of CPU/memory. Events being fired off. Please let me know the tool Where i can find it What it does Thanks in advance I have found some that are supposed to be free, I haven't tried them out myself: NProf Prof-It More... There are several profiling tools available on the market and here are three that I have already used: ANTS Profile dotTrace Profiler AQTime It all depends on your exact needs, budget, usability and so on. Therefore I recommend that you download the evaluation versions and try them out. ...Show All
Mark Macumber ** Problem with calling unmanaged C++ DLL from C# on a network drive. **
Hello, I write a C# program which calls a C++ unmanaged DLL. Actually, I write both of them. I put both of C# exe and C++ DLL to a Network folder. When I run the C# exe. The Program gives me an exception. "An exception 'System.Security.SecurityException' has occurred in <my program>." But if I put both the exe and DLL to my local hard disk, the program runs with no problem. Anyone have any idea how to solve this exception Look forward s to hear from you. Thank you, You need to change the trust level of the network folder/drive that the user is saving to and running from using something like the .NET Framework Configuration Tool or caspol . With caspol such a configuration can be as simple as: ca ...Show All
chiquiman SQl server authentication issue in C#
Hi Guys, I have a tool written in C# which connects to a remote SQl server 2005. Its working fine while I use "Integrated Security". However, I want to login the database using another credential instead of using the currently credentials associated with the tool. The reason for this was because not all the users using this tool have permission to access the database. So, I need sort of impersonation to allow any user using this tool to connect to the database. Is there any simple and efficnet way to do this Thanks. I don't know if you have SQL Server Management Studio, its a really good graphical tool. Use that tool and create a new database and name it say test... Create a new Us ...Show All
fripper Reversing Rows of an Image in a Byte Array
My core dilemma is to read each line of an image and then flip those rows bottom to top while keeping the columns of the image the same. I know that Array.Reverse() is close to what I need, but it messes up the columns. The reason why I need to do this, is because .bmp images are apparently "bottom up" and my other functions don't understand that the image data is "bottom up", so I need to find a way to account for this "bottom up" structure. The only general advice that I received was there should be 2 for loops and for each column (0 to width) do (row * linedelta + column) and swap that with (height - current row -1). But I'm still confused on how to write the code. My Code: int Line; long LineDelta ...Show All
Neil Harper How to make an Outlook 2003 style navigation pane
Does anyone know how to build a Outlook 2003 navigation pane in C# without having to buy a third party product I know its very easy using those, but I don't want to be dependent on them for this particular project. Does anyone have any suggestions on how to make it using either C# 2003 or 2005 Any adivce or resources would be helpful! Thanks, ~zero There are many free ones look at http://www.itchin.net/NBMain.html http://www.codeproject.com/useritems/fireballwindowsforms.asp http://www.codeproject.com/useritems/OutlookBar.asp http://www.windowsforms.net/Default.aspx tabindex=4&tabid=49 look at Outlook 2003 Look and Feel ...Show All
D_W Why can't an interface method be internal?
When I try to make a method in an interface internal I get a compile error. Why is this Thanks in advance, Per Rasmussen. Charles: What do you mean by "implemented explicitly" Philip: AFAIK this approach will not prevent an outside assembly to access Func() which was my purpose. Edit: What I mean is: everybody can call Aclass.Func() as this still have to be public because of the interface. See what I mean By definition implementing an interface means that all the functions of the interface are available to everyone. The onlything that you can do to have f1 internal is to explicitly implement the interface: class MyClass : ImyInterface ...Show All
ai_rasmussen How to read a float from a Big Endian binary file.
I have a binary file written in big endian. Scattered within the binary file, there are 4-byte floats that I wish to read. I can't use methods like ReadSingle() since it is in big endian format. The only thing I have found to solve this is to read it in one byte at a time...reverse the order of the array...write it out using BinaryWriter and read it back using BinaryReader.ReadSingle() from the temp file. This seems to have a lot of over head...is there a better way to do this (I tried the way below but did not work) Thanks. -JRozak FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);BinaryReader r = new BinaryReader(fs); float x=(float)IPAddress.NetworkToHostOrder(r.ReadUInt32()); ...Show All
Ibrahim Y what is the difference between .cer/.spc and .pvk/pfx?
Hello, I'm trying to figure out what is the difference between this keys. regards, Thank you boban Try Google, It'll gve you results with better explaination of each. Best Regards, Rizwan I did. but return nothing. if you can find some info please let me know. Thx .cer - states for Certificate used for storing X.509 sertificate. This certificate contains informations about certificate owner, and also public and private certificate key. .spc - states for Software Publisher Certificate. This is just different representation of certificate in PKCS #7 format. You can generate spc file from cer file. .pvk - states for private ...Show All
nate-d-o-double-g Backgroundworker + Sql
Hi I am using a Backgroundworker do load media files from a Sql Server. The user should be able to cancel this operation, but I am not sure how to implement this. If I call backgroundWorker1.CancelAsync(); there is no while-loop I can stop. private void backgroundWorker1_DoWork( object sender, DoWorkEventArgs e) { ... XmlReader myReader = XmlReader .Create(sqlCommand.ExecuteXmlReader(), mySettings); .... } Thank you Hi, This may help: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=754662&SiteID=1 Thanks for the answer, but what I want to know is, how can I cancel Sql queries If the the transfer rate is low or the Sql Server unreachable, how can I ...Show All
sideswipe creating id names on the fly?
I have a need to create new tabPages. I've done it. Now I have to put some meat on them. Specifically, they will have some surfaces that I do not quite know what they are. One of them seems to be a grid. I am using a prepackaged NPlot source code for this. Everything works on one tabPage flawlessly. Now I want to generate another tabPage, and perhaps more and put those two surfaces on each and draw graphics on them. When I tried to Control.Add (object) where the object is one of those surfaces I ended up with a new tabPage generated, two grids riped off of the original tabPage and set onto the new tabPage with a perfect plot on it. The original tabPage lost all surfaces as well as the original diagram. What I want to do is do some mu ...Show All
Yogesh Ranade How to read Active directory userlist using c#
hi all, i have an active directory structured as follows ************************************* Active Directory Users and Computers[company1.company.com] saved queries - company.com aa built in Computers Domain C ...Show All
Garry W Simple binding to Datarow - values don't update???
Hi, I have a loop that is populating label controls from a Datatable. If I simple bind the datarow to the labels' Text property, when I update the Datatable I expected the changes to be reflected in the label. This is true if I bind the the table directly. // this shows the correct values but they don't update when I update the data in the table ... templabel.DataBindings.Add("Text", dt.Rows[i ] , "state"); ... // when I bind directly to the table, updating the table does reflect the changes. But this option is no good as all my label controls have the same values. ... templabel.DataBindings.Add("Text", dt , "state"); ... What I'm trying to achieve, is when I update the data in the table the changes are reflected automatically in the bo ...Show All
pg1024 How to return a string[] from a function?
Hello, Each time that function MyFunc is called, MyFunc fills a string[] with a unknown number of items. (all serial ports on my computer) How do I define MyFunc, to have it return this filled string[] //MyFunc tryout: public string[] MyFunc(){ string[] PortNames=System.IO.Ports.SerialPort.GetPortNames(); return PortNames; //calling string[] MyString=someclass.MyFunc(); raises an exception when called the 2nd time. Should I use MyFunc with some 'ref' argument, if so, how Henk Oh I',m sooo sorry, through my mess of coding I had set FormA's reference to null in my callback function! ;-) (shame shame) my believe in C# is back.... thanks for ...Show All
Bhanu Akunuri Error: "The path is not of a legal form" in C#
Hello.I receive the following error Error: "The path is not of a legal form" in C# in the code string location = "List.txt" ; // Read lines StreamReader reader = new StreamReader (location); string [] file_lines = (reader.ReadToEnd()).Split( '\n' ); // Add in Lista foreach ( string one_line in file_lines) { string file_location = one_line.TrimEnd(); System.IO. FileInfo info_item = new FileInfo (file_location); if (info_item.Extension == ".mp3" ) { ListViewItem List_Item = new ListViewItem (info_item.Name, 0); List_Item.SubItems.Add( "XX:XX" ); List_Item.SubItems.Add( "Necunoscut" ); List_Item. ...Show All
