For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
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!