Answer Questions
lostromich 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 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.MapPath("/test/foo.xml")); } Where "test" is the writable directory. Hey. Does Server.Mappath works with the desktop applications If yes or no then How No, it's totally related w'th asp.net, if you are running a desktop app and if that app is at the webserver, then you know it's location (could be something like c:\inetpub\wwwroot\....) or if it is under a ...Show All
Chehmer StreamReader.ReadLine() problem
i have been able to send AT commands to my gsm modem and got their response using streams.. im accessing serial communication port to connect to my gsm modem.. my problem now is when i issue the AT+CMGS="<destination number>" command my app hangs and the modem does not respond the '>' character.. it is as if it does not end reading the stream( ).. i dont know what's the problem with this one. i run it before in .NET 2003 and it works fine. when i upgraded to .NET 2005 beta, thats the time when i started encountering this problem.. added to that.. i think the problem also is with the response of AT+CMGS="<destination number>" command. it seems that the streamreader.readline() did not encounter an end of line or maybe an en ...Show All
Boogeyman777 SslStream.Read() - Returns invalid data
Hey, I am currently attempting to implement a multi-threaded C# socket, using SSL (.pem file/certification/private key combo) server using Visual Studio C# Express. I have successfully made the client application establish a connection, and send data, which appears in plain, de-crypted text on the server - this works. However, I am 'polling' the socket to see if data is available to read. Here is some code which is appropriate: ---- public void Process(int threadId) { int BytesRead = 0; try { Master.Log("BEGIN READ"); sslStream.ReadTimeout = 5000; BytesRead = sslStream.Read(bytes, 0, bytes.Length); Master.Log("READ " + BytesRead + " bytes"); if ( BytesRea ...Show All
dzimmy BitVector32 purpose?
Experts, I'm trying to take in Collections and have run across the BitVector32. Is the sole purpose of a BitVector32 item optimizing available hard drive space (Example: Using 3 sections of a BitVector32 to store 10, 1, and 192 instead of 3 external 16-bit variables) I only ask because it seems the practice of utilizing bit packing for number storage outweighs any small advantage gained in space conservation or is there an aspect / capability to BitVector32 I'm missing Thanks in advance ~ Chris McQuade It is to conserve memory, not disk space. Fairly common in the olden days but increasingly irrelevant with 1 GB of RAM. You'll trade speed for space. The equivalent C/C++ concept is bit-fields . Note that BitVector32 is a ...Show All
cplusplus1 Application Verification error
I created a setup with InstallShield 11 and I'm running it through Application Verifier v 3.3 and I get the following errors: < avrf:logEntry Time =" 2007-03-01 : 11:05:48 " LayerName =" Heaps " StopCode =" 0x13 " Severity =" Error " > < avrf:message > First chance access violation for current stack trace. </ avrf:message > < avrf:parameter1 > 31b1fb1 - Invalid address causing the exception. </ avrf:parameter1 > < avrf:parameter2 > 41d042 - Code address executing the invalid access. </ avrf:parameter2 > < avrf:parameter3 > 13ad94 - Exception record. </ avrf:parameter3 > < avrf: ...Show All
MShanahan Sending an email through a web service
Hi, I need some help with the Web Service security. I have a web service that picks up a file from a folder (any folder, network, local etc) and sends it using SMTP to a mail recipient. When I browse to a file on my machine, example C:\Temp\File1.doc and invoke the web service call passing the file, the system is able to attach the selected file and the email is sent successfully. However, if I point to any file in C:\Document and Settings\... or on the network, say \\ServerName\ShareName\File.doc, the system is unable to attach the file to the mail message being created. The error message is 'Invalid attachment'. I have enabled Anonymous Access for the web service and cleared all the other checkboxes in the Authenticated acc ...Show All
DevJ C# REMOTING CANNEL ERROR
ok, well i'd like to thank you for the help with my security issues, worked fine. now i have run into another issue... heres the pose this happens when i once again try to send a msg from the server to the client: System.Runtime.Remoting.RemotingException was unhandled Message="This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server." Source="mscorlib" StackTrace: at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMessage reqMcmMsg, Boolean useDispatchMessage, Int32 callType) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg) ...Show All
Haojun Parsing double value from a string
Hi all, I need to parse a string which is in the following format (example): -0.0004 USD/Tonnes Basically, it will be a double value, might be preceded by the negative (-) sign and followed by <Currency>/<Unit of Measure> . The result should be just the double value (with the sign if its there), as in the above example, it should translate to -0.0004 I wanted to know if there is an easy way of doing it in C#, like using the Double.Parse() or the string.Format() methods (I tried them both but couldn't get them to work) Or do I have to parse the string character-by-character to get the required result Thanks in advance, MadMonk P.S.: Apologies if its a silly question, I'm still a newbie in .NET ...Show All
SyracuseCheer Soap Error "SQL Server does not exist or access denied"
Hello All, I have a webservice uses a vb.net component that accesses thrid party dll to connect to a sqlserver dbase, username,dbase name ,server and password are passed to the third party dll for login purpose. This works fine in development evironment when pda client calls webservice, A soap error is thrown to the client "sqlserver does not exist or access denied" when the client calls the deployed webservice. I have tried the following 1. Added ASPNet user to the database 2.Added domian user to the database both has public and dbowner rights Can any one help Thanks Regards I am curious why you need a third party dll to access SQL Server when you can do so using ADO.Net Use SQ ...Show All
Kushu RFID Reader Project
Hello, I'm currently working on a project which involves a serial port RFID Reader. I have connected the Reader to COM2 of my PC and i'm trying to get the signals from the RFID Tags. I'm using Visual C# and SerialPort class. The problem is that i can't read or write to the port. I even tried to write something to the port using port.Writeline("string") and then read it with Readline() but it seems that nothing is written and nothing can be read. When i set the RtsEnable to TRUE the BytesToRead property changed from 0 to 9 no matter what i did and still i couldn't read anything. I also wanted to ask you if you have any code samples to send me or if any of you has written a similar program that works. I need to fix t ...Show All
Johan Overbye Unable to update data adapter - C#
Any expert here pls help me up. Recently i was learning about d C#.net. I was following d msdn guide in Updating d data adapter wit dataset. When i try d debug d code line by line, everythings seems fine until d last statement which is update d data adapter failed(I highlight with red color in my code). D exception tat is displayed An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll Additional information: Update unable to find TableMapping['Table'] or DataTable 'Table'. This is my code: string cString = "Persist Security Info=False;Integrated Security=SSPI;database=northwind;server=white"; SqlConnection myConnection = new SqlConnection(cString); myConnection.Open(); SqlData ...Show All
Alexnaldo Santos Calculated fields?
Hi, hope you can help. I have a Data Access Layer that uses DataView to provide data to my UI. I have a simple grid on my UI to display this data. The table is concerned with scheduled maintenance jobs and it has lots of fields for recurrence patterns. However, in my UI I want to display a human-readable version of this pattern. For instance: My table looks like this: TaskId FirstActionType FirstActionDays FirstActionDistance RecurringActionType RecurringActionDays RecurringActionDistance But in my grid, I want something like this: ACTION RECURRENCE PATTERN Job A Starts in 30 days or 1000 miles, whichever is sooner, repeating again every 60 days or 5000 miles, which ever is ...Show All
Tej62007 Raiserror and select statement combination having problem with sqlexception
I have a stored procedure having following code in it create proc tmpproc as begin Select 'test' raiserror('not cought',16,1) end when i call this proc using sqlCommand the exception doesn't get cought in the catch block. I am catching SQLException. If I remove the select statement from the code it works fine. Now i need some work around as i 100s of SPs that have this kind of code and want call these procs using ADO.net If any body can i help me it would be really great for me Regards, Vikas Bindra set nocount on is also not working, the exception is still not caught. Follwoing is the updated script: set nocount on select @localvariable 'Localvar' raiserror('not caught',16,1) ...Show All
Michele_T Workflow type projects are not opening in Visual Studio 2005 running at my desktop
HI, I am using Windows Server 2003 SP1. I have installed the Dot Net Frame work 3.0 at my system. Now after installing this i downloaded some sample projects on Workflow Foundation from Microsoft website. When I open the project it shows me the following error message --------------------------------------------------------------------------------- The project file 'D:\Softwares\WinFx SDK\Samples\Applications\OrderingStateMachine\VB\OrderWorkflows\OrderWorkflows.vbproj' cannot be opened. The project type is not supported by this installation --------------------------------------------------------------------------------- Please advise what I need to do to run the projects. Thanks, Qas ...Show All
Cappy Popp Creating a SQL Server Express Database File in VB Express:How to create a new connection to Database Explorer to the NW Sampl DB
Hi all, I tried to create a SQL Server Express Database File in my VB Express project by following the steps outlined in "Walkthrough: Creationg a SQL Server Express Database File" posted in http://msdn2.microsoft.com/en-us/library/ms233763(VS80).aspx . I have completed (i) Creating a Windows Application, (ii) Creating a New SQL Server Database, (iii) Creating New Tables in the Database and tried to do (iv) Polpulating the Sample Tables with Data. I have difficulties to do the following instructions stated in the article: To populate the Customers table with data 1. Create a new connection to Server Explorer/Database Explorer to the Northwind sample database. For more information see How to: connect to Data in a Database ...Show All
