I need your help in my program. I am trying send data to remote server. I have made connection with remote server using TCP/IP it gives response now. But Now, i want to send command to server. it includes my first name, last name as FNAME, LNAME, EMAIL AND HOST-NAME and I am making this program for registration so after that server will return regstration number. when i try to send data it says, 530 command 'fname' command not accepted in this state. Now i don't understand how to bind all data in one string or what format should i use to send data so that i can send it to remote server. Thank you in advance.
I know the commands these are FNAME, LNAME, EMAIL, HOST. In FNAME i will pass user first name in FNAME same for last name , email and host. or there is some way to send data to server that i don't know ?
I have a webpage that Is hosted on a IIS-server. When I use Internet explorer to upload files, I get the following error:
<System.Exception: System.Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\brkar1\Downloads\dokumentation.docx'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br />
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)<br />
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)<br />
at System.IO.File.InternalWriteAllBytes(String path, Byte bytes, Boolean checkHost) at System.IO.File.WriteAllBytes(String path, Byte bytes) at OrderForm.Service.Services.FileService.d__0.MoveNext() in C:\Git-new\devteam\web-applications\ICOM.OrderForm\OrderForm.Service\Services\F
However, If I use firefox, It works just fine.
If I start the project localy in IIS-express, I don't get any exception, but the file Is still not uploaded.
Here Is my code for uploading:
var keys = Request.Form.AllKeys;
var jsonData = Request.Form.Get(keys);
var files = this.Request.Files;
List<FileModel> fileData = new List<FileModel>();
if (files.Count >0)
for (var i = 0; i < files.Count; i++)
FileModel fileModel = new FileModel();
HttpPostedFileBase file = files[i];
BinaryReader b = new BinaryReader(file.InputStream);
fileModel.data = b.ReadBytes(file.ContentLength);
fileModel.FileName = file.FileName;
var result = await orderService.Create(orderModel, fileData.Count() >0 ? fileData : null);
if (files.Count() >0 && orderNo >0)
var folder = ConfigurationManager.AppSettings["AttachmentFolder"] + "\\" + orderNo;
if (Directory.Exists(folder) == false)
foreach (var file in files)
FileModel newFile = new FileModel();
var fileName = file.FileName;
var filePath = Path.Combine(folder, fileName);
File.WriteAllBytes(filePath, file.data); //This seem to not work when using Internet Explorer
newFile.FileName = fileName;
newFile.FileUrl = filePath;
ConfigurationManager.AppSettings["AttachmentFolder"] + "\\" + orderNo is just a folder where the file should be saved In.
I'm stumped I have two programs. I'm using the same code in both. It works in one and not in the other. Anybody have any idea what could be causing this?
System.NullReferenceException: 'Object reference not set to an instance of an object.'
tbQ2 was null.
Object reference not set to an instance of an object...
... is one of the most common questions asked here. It merely means that you are using a variable reference that has not been initialised, either through omission or error. The only way to track it down is by using the debugger to examine all references at the point of failure. In your case the offending variable is tbQ2, but we cannot guess where it should have been setup, or what other code may have affected it.
I guess I should have been more detailed in explaining the issue. The code in the two programs are almost identical. I have used this report writer wpf window many times and never had this issue. The xaml code for the checkbox is apparently setting the text box before it is getting initialized in wpf. "OOPs" I think I might have just answered my on question. I hate when that happens.
I'm, once again, facing a little problem. I have a view that puts together different rows from 4 different tables. In my WinForm application I display those in a datagrid view, now I want to delete a row from the datagrid and remove the entry from the view aswell as from two of the tables 'linked' to it. How would I go about this? I've already tried looking for a solution online, though couldn't find anything that did what I need.
P.S. Kinda forgot to mention, that I'm using Entity Framework for the whole apllication.
I need to locate a multiline text in a pdf document. I found two possibilitis
ColumnText.ShowTextAligned(writer.DirectContent, Element.ALIGN_LEFT, new Phrase(textPhrase), calculatedX,calculatedY, -rotation);
But when I locate the text this way, I just can see the first line and all other lines get cutted.
TextField tf = new TextField(writer,
new Rectangle(calculatedX, calculatedY, calculatedX + width, calculatedY + height), "");
tf.Text = text;
tf.FontSize = font.Size;
tf.Font = font.BaseFont;
tf.Options = BaseField.MULTILINE | BaseField.READ_ONLY;
tf.TextColor = font.Color;
This works good and I can see all lines but the problem is that i can not set attributes like Bold underline....
Can you please help me to find a way, that I can see all lines and set attributes like bold, underline...
Describe the tools/libraries you are using to parse/access the pdf file. Describe your development environment.
We cannot read your mind.
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
I'm having a source code of an Api, but since we don't have to change it. I'm creating a windows service that register it as a COM component then it could be used from the client. I'll try to simplify my issue.
I started with the creation of an interface having the function and an event (that uses delegate)
And then I did all the other steps to register it as a COM component and launch use it through a service.
when I call it using a client, it is recognized and the function returns the result perfectly
var _apiServiceObjType= Type.GetTypeFromProgID("ApiService");
var _apiServiceObj= Activator.CreateInstance(_apiServiceObjType);
var result = (ApiResult )_apiServiceObjType.InvokeMember("Function1",
BindingFlags.InvokeMethod, null, _apiServiceObj, null);
But when I want to subscribe a method to the event, I get a null eventInfo in the following instruction and can't go further
I believe you need to use the GetEvent() with "binding flags":
An event is considered public to reflection if it has at least one method or accessor that is public. Otherwise the event is considered private, and you must use BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static (in Visual Basic, combine the values using Or) to get it.
I am a beginner in C #, I want to use the commands push and pull (adb) to transfer and synchronize a sqlite file to Sql server 2008 r2 to a windows forms application in C #. I need to transfer data from a mobile application to android, which contains a set of assessments on participants and then display the notes on the interface of the windows forms application. I need your help . Thank you
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Please try to explain in better detail what the problem is, what you have tried to do to fix it, where you are stuck, and what help you need.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
Last Visit: 31-Dec-99 18:00 Last Update: 22-Jun-18 21:04