Software Development Network Logo
  • VS Team System
  • Visual C++
  • Visual Studio
  • Visual C#
  • Visual Basic
  • IE Development
  • SQL Server
  • Audio and Video
  • Windows Forms
  • SharePoint Products
  • Windows Vista
  • Game Technologies
  • .NET Development
  • Microsoft ISV
  • Smart Devicet

Software Development Network >> .NET Development

.NET Development

New Question

Interop: Deserializing xsi:nil values to System.DateTime
Transfering large BLOB
Exception between C# and COM (possible vtable or RCW problem?)
System.NullReferenceException: Using DataAdapter.Fill
GridView Edit button does not work for the first time
sent byte array shifted
How can I create Images from a URL?
COM+ EnterpriseServices distributed transaction between XP SP2 and Windows 2003 SP1 fails
change p12 privatekey passphrase
Why not Match(IEnumerator<char>) ?

Top Answerers

E.Ganesan
Troy Lundin
Duncan Woods
Vijay_s
SunFish7
Young K
RHolt
comspy
Are Haugsdal
John Stearns
sitemap
Only Title

Answer Questions

  • cwest How can I restore deleted rows by DataSet.RejectChanges()?

    Here is the simple code: DataSet dt = new DataSet () ; dt. Tables. Add () ; dt. Tables [ 0 ] . Rows. Add ( dt. Tables [ 0 ] . NewRow ()) ; dt. AcceptChanges () ; dt. Tables [ 0 ] . Rows. RemoveAt ( 0 ) ; dt. RejectChanges () ; It doesn't work which means that the deleted row is not restored. This case is pretty simplified, but in my real project I have the same problem - cannot perform full rollback all local data changes in DataSet object. Need your advice. Thanks. Remove != Delete. Remove doesn't change Rowstate. So calling Remove or RemoveAt takes it out of the collection. Delete on the other hand, leaves it in the collection but sets the Rowstate to Deleted. Then when you call AcceptChang ...Show All

  • cyberw&amp;#228;lder How to extract a value from an object in a form of string?

    string dts="valueOfX"; int valueOfX=1575; How to use the reflection to extract the value of 1575 if the only object that I get is a string called dts Need some help here pls! I've been reading about reflection but need example pls! Thanks  Ahh... that’s why you cannot find dts... it’s not a field of the class but a local variable within a method (in this case the constructor)... try moving them both outside of the constructor and into the class as a whole. Brendan, thanks for the reply. I think this will work, but I need to find out why the fieldInfo f becomes null. Thank you so much. nobugz, thanks for the response. Could anybody give me an example I understand I need to look for it myself, ...Show All

  • Wajdi Georges SerializationException on End of Stream Encountered before parsing was complete

    When I deserialize , some time it sucessful ; some time it error "End of Stream Encountered before parsing was complete". I dont khow why Here is my code public static void SaveObj<T>(T obj, string dataFile) { FileStream FS = File.Create(dataFile); BinaryFormatter binSerializer = new BinaryFormatter(); binSerializer.Serialize(FS, obj); FS.Close(); } public static T RestoreObj<T>(string dataFile) { FileStream FS = File.OpenRead(dataFile); BinaryFormatter binSerializer = new BinaryFormatter(); T obj = (T)binSerializer.Deserialize(FS); FS.Close(); return (obj); } Your help is greatly appreciated . Thks a lot while ( true ) ...Show All

  • gdrivas232096 Audit/Log the change in DataSet

    We want to Audit/Log the changed data in DataSet and found DataSet.GetChanges will return whole changed rows even this row only have one field changed. We understand we can write our own script to compare original datarow and changed datarow finding out which column change. Does there have another way to Audit/Log the changed datacolumn Thanks, Agree Hi, GetChanges is only valid until the dataset's AcceptChanges method is called (called automatically by the table adapter's Update function). The most flexible and non intrusive way to create a log of the dataset's changes is to attach event handlers to the tables RowChanged, RowDeleted and TableNewRow events for every ta ...Show All

  • Tom McDonnell How do I control Windows service application from external program?

    Hello, I hav a task of creating Windows service which has some GUI for configuration data used by service. So I plan to have 2 projects in solution - Windows service itself and frontend manipulation program. How do I attach from within a program to Windows service and how do I call events inside Windows service to reread configuration file once changes are made Thanks, G I need to pass information to service like location of configuration file, CustomCommand will not be able to accomplish that becouse I can pass only integers, and I don't want to go through IPC or remoting stuff since it's so much complicates the project. Is there any other easy alternative, I really need just to tell service wh ...Show All

  • Hatkesh Help with TripleDES and RC2 cryptography.

    I have 2 questions - 1) I get the following Exception when I try to decrypt data using TripleDES. - "An unhandled exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll Additional information: Specified initialization vector (IV) does not match the block size for this algorithm." How do I make things right The code is as follows - /* Provides TripleDES encryption and decryption using classes in the .net Framework 1.1 */ public class TripleDES_Cryptography { public static string Encrypt(string plaintext, string key, string IV) { TripleDES des3 = new TripleDESCryptoServiceProvider(); des3.Mode = CipherMode.CBC; byte[] by_plaintext = Encoding.ASCII.Ge ...Show All

  • john82 folder gets buggy after issued: System.IO.Directory.Delete(dir) call.... :(

    hi, I created an .net app which allows user to delete certain folder from the server. After the codes executed, the folder is still there and when I try to do anything to it with my mouse, i kept getting " access denied" messagebox. :( I even tried to delete the folder from cmd, but no luck ... (it doesn't show access declined, but the folder still there after issue dir) this is what my codes (.net 2.0) like, would anyone please help me take a look at it and see what I did wrong Thank you very much in advance. [code] 'this method supposed to delete all files within the folder and the folder itself Public Shared Sub removeUserFolder(ByVal username As String) Dim userFiles As String() 'the saveImageBL.getImagePath will return the path tha ...Show All

  • Alex Kil Creating a "Proxy" for Client-Web connection

    Hi, I have created an application that uses internet connection (think of it as a web browser), but this application is going to run on another computer, by another user, and instead of accessing directly the web, I need that application to access the web, through my computer. So basically I need to create a sort of proxy server for that application, so it accesses the web and receives the data, all done through my computer, that will be using a small application to serve as a 'proxy' for the connection between the client application and the web. ? I need help in creating this kind of server, and I will also need to know what will the client application need to communicate with the 'proxy server', that will be my computer. Here ...Show All

  • joejoejoeoejoe Joined tables, update database with many rows, What is Best Practice?

    I have 3 tables(A, B, and C): A and B have identity fields and C is an associative table with each row referencing back to the identity of A and B. To better describe the tables, A will represents objects, B will represent predefined items the object can have, and C will contain any object/item relationship. I will then have a data grid displaying a handful of objects and the items that could be set. Items already configured for an object will display with a check box, and the rest will be unchecked. When a new association is set, a row will be inserted into table C. When an association is un-set, the row will be deleted from table C. Let's say the situation is like this: initially one object in A has 20 items set, and another object has n ...Show All

  • Evan Mulawski Correct use of ConfigurationElementCollection and ConfigurationElement

    I am creating a config file for my application that is a little more complicated than any of the examples I have  based it on and I cannot find many examples of using ConfigurationElementCollection on-line. I am trying to populate controls on a form using data defined in a config file. The primary problem is that adding the ConfigurationElementCollection items to a drop down list in a ComboBox control adds the name of the object (i.e. “OptionItemElement”) rather than the actual values of the attributes (i.e. “1200”, “1210”, “1220”, “1230”, “1240”). (Much of the code is adapted from Parameterize Your Apps Using XML Configuration In The .NET Framework 2.0 and How to: Create Custom Configuration Sections Using Configura ...Show All

  • pessi System.Drawing.Bitmap max size

    I've got a situation where I'm creating a bitmap as follows: bitmap=new Bitmap(newWidth,newHeight); newWidth is say 10,000 and newHeight is like 9,000; Upon hitting this line I get an error about invalid parameter being used. It happens almost everytime, but a few times I've been able to create the bitmap. I'm using .net 1.1.4322 for this project not 2.0 so this might not be an issue anymore. Is there a limitation to bitmap and what is it dependent upon Yeah, you're pushing the envelope a bit with this bitmap. You'll need 10000 x 9000 x 4 = 360 MB of contiguous virtual memory space for it. I had no problem allocating it myself within the debugger, 1 GB Ram, 2.5 GB swap. But you're probably allocating so ...Show All

  • Hooper CRL First time error

    Hi all, I'm a beginner in VSTS and C#. I have made a tool that uses a couple of references to external tools. When I run the tool, I often got a error message during the execution, saying : "The CRL has been unable to transition from COM context 0x19ffa0 to COM context 0x1a0110 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or..." If I close the debugger and re run the code, it works fine. Does anybody know how I can avoid this error message Do I have to instanciate or initialize the references Thanks a lot, Bertrand   Try disabling the MDA(Managed Debugger Assistant) and running your application. You might have to go t ...Show All

  • SPWilkinson performence issue of an XML reader

    Codes: // Load an XML file and display the structure and content in a tree view. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Xml; namespace XMLReader { public partial class XMLReader_WindowsBased : Form { public XMLReader_WindowsBased() { InitializeComponent(); } private void btnSelect_Click( object sender, EventArgs e) { ofdXMLFile.ShowDialog(); txtXmlFile.Text = ofdXMLFile.FileName; } private void cmdLoad_Click( object sender, EventArgs e) { // Clear the tree. treeXml.Nodes.Clear() ...Show All

  • Joeku Write data on webserver.

    Hi, I wants to create a xml file in the webservices virtual directory from C# desktop application. can any one help me out Are you on the same domain with the webservice If yes then you would just get write permissions for that directory and create the xml file that you need. You may construct it with xmlwriter or serialize it with xml serializer, or create xml tree with xmldocument object and save it. Yes, I have already the write access, can you provicde me the C# code to write a simple string in a file on the virtual folder. In your ASPX page you could do this: void Page_Load(object sender, EventArgs e) { XmlDocument doc = new XmlDocument(); doc.Load("<test/>"); doc.Save(Server.Map ...Show All

  • tattoo Permissions problem running from IIS

    Web application uses old style ASP pages at the front, and a vb.net 2005 DLL at the backend. The IIS web is setup with Integrated authentication, and Anonymous is turned off. One option in the app involves running through the shell command a .NET EXE. That .NET EXE attempts to do some WMI stuff but it doesn't have the permissions to do that. The Shell command is inside the vb.net 2005 DLL. I log into the browser as Administrator, and the winapi username shows up correctly as administrator in debug sessions. So why doesn't my shelled application have all the permissions that administrator has ------------------------------ more info.. ASP Page > x = createobject("mydll.myclass") c = x.shellthatEXE () In My ...Show All

646566676869707172737475767778798081

©2008 Software Development Network

powered by phorum