|
I have an asmx Web Service hosted on our secure website which is consumed from a c# library that is used by several WinForm desktop Applications.
Currently, I can only get to the ws by using the actual ip (instead of the web address) end the endpoints / bindings. This works wonderfully for our in network users, however we have out of network users as well.
I should add that I can access the direct url to the ws from out of network which shows the test page, however the tests all return errors (unless within network).
The error I get testing is that the request content-type is expecting xml but receiving html response. This just probably means it is returning an error instead of the xml content.
Has anyone else conquered this issue? Any help would be greatly appreciated...
|
|
|
|
|
I have created a form in a tabcontrol -> tabpage, it has a contract format and I need to print it. So, I heard about PrintDocument but I don't really know how should I use it to print a tabpage because it has a large height and it should be printed on multiple pages. Any suggestions please? Thanks
|
|
|
|
|
That's what a PrintDocument is for - it allows you to select exactly what is printed, and where it is printed, in what font, what colours, etc.
What it doesn't do is "print a control" such as a tap page - because that's silly. The control is very unlikely to conform to the form factor of the paper being printed onto (and it'll have a "screen based" resolution rather than a "printout based" resolution, which is generally a lot, lot higher.
Have a look at the documentation: https://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument(v=vs.110).aspx[^] - it includes a simple example.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Well, which is the right way to print a form with textboxes, labels in a specific location in form? In that example it prints a text file. But in that way, it prints the whole windows form. Or, is there any third way? For example to send data in a word document?
|
|
|
|
|
Why would you want to print text boxes? Do you expect the user to type in them?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
No, I mean the shape of textbox..I have to print a specific design of the form, as I said, its format is as a contract..it's not just some simple text..
|
|
|
|
|
If you look at the example, it draws the text via the DrawText method of the Graphics object.
A quick look at the documentation would show you there are a lot of other Draw... methods. Including lines, rectangles, circles, paths, images, filled and unfilled.
So if you want a form with boxes for the user to write in, then DrawRectangle is probably a good place to start...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ok then, it seems that this is the solution. Thank you for your time and help.
|
|
|
|
|
I would like to track user mac address from code behind when user is browsing my website.
|
|
|
|
|
Fortunately you can't do that, your ARP requests won't make it to the user.
|
|
|
|
|
Just to add to what Harold said, you can do it, under very specialized circumstances.
The user has to be running IE (not likely, and soon to be even less likely with Win10/Edge released)
The user has to allow ActiveX controls to run (not likely, they are disabled by default)
The user has to allow ActiveX controls to download (not likely, that is also disabled by default)
Then all you have to do is write an ActiveX...and it will work for far less than one percent of your visitors.
And it is so easy to "spoof" MAC addresses that it isn't worth trusting them anyway!
If this is for security, forget it!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If you google this strangely common request you'll find the exact same answer given to everyone else who asks this....you can't.
|
|
|
|
|
|
what is cookie.discard? and how to use?
anybody know please tell me.
|
|
|
|
|
Here[^] you go. There's lots of information available there.
|
|
|
|
|
how to pass data from gridview page to another page textbox in asp.net with C#
|
|
|
|
|
Store it in the Session, or a Cookie and retrieve it in the Load event for the new page.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hello everyone,
I've been working on a C# project with WPF client, WCF server and Entity Framework 6 to get database access. I use an entity-object to communicate between server and client. Due to this the entity is detached from entity framework cache manager when transferred to the client. If there is an update the client calls a server facade through service references and sends the updated entity. Since it's detached a simple dbContext.SaveChanges() on server-side doesn't work, so I set
dbContext.Entry( project ).State = EntityState.Modified;
dbContext.SaveChanges();
where 'project' is my entity I want to update. This works fine on the entity itself but I need a solution to update the entity and all corresponding entities held within this entity - a recursive update.
To make it more clear have a look on the ERM. Project holds a Client and Building which are also entity-objects.
http://imageshack.com/a/img537/8806/y6Zzxt.png[^]
When I set the explicit state for each entity it works, but then again it's not as generic as I wish for. So the challange is to find a solution where I don't have to handle each property of my entity-object separately.
Currently I use the repository pattern as follows:
public abstract class PersistenceIntegrationService<T> : IPersistenceIntegrationService<T> where T : BaseEntity
{
...
public T Update( T entity )
{
if ( entity == null )
{
throw new ArgumentNullException( "entity" );
}
try
{
this.PreUpdate( entity );
this.AddModifyInformation( entity );
this.persistenceContext.SetModified( entity );
this.persistenceContext.SaveChanges();
this.PostUpdate( entity );
}
catch ( DbEntityValidationException e )
{
string message = this.PrettifyDbEntityValidationExceptionMessage( e );
throw new EntityValidationException( message, e );
}
return entity;
}
}
Although I have pre-persist-hooks I do not want to set the state explicitly, as mentioned earlier. I wonder if there is a built-in solution from entity framework. For my searches on the web I didn't find any hints regarding this challange.
I would appreciate any suggestion or idea.
modified 3-Aug-15 4:27am.
|
|
|
|
|
|
Many thanks for this article!
The problem described in the article is the same but the idea to solve it seems not to be as generic and simple as I would like to have it.
Currently I'm trying to override SaveChanges() and hope to get a solution with minimal or no difference in the usage compared to the Entity Framework built-in functions. Maybe I can use some parts of the approach from the article.
|
|
|
|
|
|
hi all!
I know that the only way to find the Separating Axis is the brute force. Is there a way to avoid this(it's true that a computer can calculate more than 10000000 dot products,with a fast result).
Seen that V-clip and gjk suck...
I was just wondring!!!
thanks!!!
|
|
|
|
|
You apparently answered your own question before you even got to the question mark.
Isawyouoo wrote: I know that the only way to find the Separating Axis is the brute force.
Isawyouoo wrote: Is there a way to avoid this
So, when you Googled "polygon collision detection algorithms", what did you come up with?
|
|
|
|
|
I came up always with the same arguments blablabla...
|
|
|
|
|
How to make a qr code encoder and decoder with c#. Not libiray file.
|
|
|
|