« first day (2244 days earlier)      last day (2707 days later) » 

5:00 PM
To read a response from a socket, something on the other end has to write to it
Are you certain that's happening?
 
@TomW I am connecting to my Apache server running on eclipse. I think it works, because I am able to connect with the browser to the WSDL page of the web service
And in Eclipse I can get response of the Web Service
 
Hello
 
Yeah what you're sending in that code sample isn't an HTTP request
No wonder it doesn't respond
 
Also with the reference works
but I have to connect to the IP that users say in every moment
so I need Sockets, to send and receive to the IP I get
 
What? No you don't
If you really actually need sockets, make sure what you're sending is actually HTTP, otherwise an HTTP server will ignore you
6
Q: Format of an HTTP get request

sweeneyrodI'm writing an HTTP server (for the sole purpose of educating myself). A typical GET request seems to be this: GET /?a=1&b=2 HTTP/1.1 Host: localhost User-Agent: my browser details Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 ...

But I am 99.9% certain you do not need to do it like this, just use an appropriate abstraction from the .net framework to do this for you
 
5:03 PM
So probably, that is my error
I am sending this to the server:
"<soapenv:Envelope
                         xmlns:q0=""http://master""
                         xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""
                         xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
                         xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">
                           <soapenv:Header>
                          </soapenv:Header>
                          <soapenv:Body>
                        <q0:leerRMI>
                            <q0:recurso>volumen</q0:recurso>
 
That's fine as a request body
An HTTP request isn't just a body though.
 
This dude trying to roll his own SOAP client?
 
Looks like it
I really don't understand why you're making this so difficult for yourself
 
WCF. #jobdone
 
what is that?
I would like to do it adding web reference
but the problem is that not always is the same WebReference
 
War
5:07 PM
:facepalm:
 
and I don't know how to change the Web Reference URL
dynamically
when the user says to me
 
> Windows Communication Foundation (WCF) is Microsoft’s unified programming model for building service-oriented applications. It enables developers to build secure, reliable, transacted solutions that integrate across platforms, and interoperate with existing investments.
 
43
Q: How can I dynamically switch web service addresses in .NET without a recompile?

stamesI have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments where machine names and IP addresses are different. The ...

 
War
I had to write some code for that at my last job
 
2
Q: What should be modified to change the URL of a web service in C#?

pencilCakeI have one problem and it is some time ago I have added a Webservice proxy class into my application by copying all the generated code (copy paste the text of the .cs content). And it worked! But now I need to change the URL used by this web-service proxy class and I am not sure what and where ...

 
War
5:09 PM
we had a system that would allow us to put data in the db and schedule a WCF call
 
@TomW I have read that, but I follow it and I don't get the same
 
I'm getting rid of WCF in our codebase :D
 
@QuicoLlinaresLlorens so work out why and fix it
 
We have some WCF that we were going to try to get rid of
 
War
I ended up writing code that used code dom and the WSDL.exe file to basically gen the WCF client and then compile it and execute the call at runtime
 
5:09 PM
Then Python happened
 
War
it was a bitch
personally I think WCF makes stuff that should be dead simple really hard for no reason other than to support forms of binding that really never get used
 
What's wrong with just using ChannelFactory.CreateChannel(new EndpointAddress(things))
 
War
this is why Microsoft themselves now pretty much exclusively use WebAPI and OData for stuff
 
Steps for solving a problem using a particular technology:
#1: Learn how to use it
 
#2: Fail at learning
#3: Curl into a ball on the floor and try not to cry
 
War
5:11 PM
WCf was always a headache ... and never very dynamic
 
#4: Cry alot
 
I think the problem is the tutorial that the post relink, is very old
 
@War Makes the easy stuff hard and the hard stuff possible
 
War
@mikeTheLiar maybe ... I guess I never had a situation where I wnated to something that was sufficiently hard that it warranted the use of it at all tbh
 
and my VS version doesn't show the same
 
5:12 PM
Yes it is a horrendously complex framework, but because it needs to be to support the horrendously complex standard it was designed to implement
 
War
but then the bulk of what I build is web API's and applications
I feel for anyone who actually NEEDs WCF
 
It's actually pretty logical and modular once you get the hang of it, and is massively extensible
 
War
because they are in a right bitch of a situation
 
raises hand
 
War
dam @TomW ... sorry dude
 
5:13 PM
I haven't got lot of files that the tutorial says
 
I have a scenario right now that doesn't work and I can't see why. I'm this close to setting off the "lose our fucking contract" alarm in the office to get someone to help me
 
e.g. web.config
 
@TomW you have one of those?
 
Metaphorically.
 
Ah
Does it involve you shouting across the office for help?
 
5:15 PM
It may come to that.
 
!!giphy do it
 
Seriously if I were to start a company I'd have that as a literal policy spelled out in the handbook
Have a process for "Help me right fucking now" where an employee can fire off an email or something that says, everybody addressed by this drop whatever you are doing and help now. Failure to respond is a sacking offense
 
its a good idea
 
But firing one off without good cause is also a sacking offense
 
5:17 PM
lmao
 
For it to work you need to be able to trust that you'll only get one if they're serious
 
you could always just implement a system that has a list of all the senior developers in your company and randomly selects one to help you
and sends them an email
otherwise you'd end up with a bunch of people running to your desk
 
that would be nice
oh yeah I'm on-site and I'm the only one, I'm a consultant. Most of the company, who never see me, don't know who I am
 
welp
 
Aaand this was all a ruse to get you to pay attention to me and answer my question
 
5:21 PM
Doesn't look like anything to me
 
Tom I'mma put a bounty on that question just to get you to shut up about it
Is there a biztalk SE site or did I make that up?
I can't find it now so I assume I made it up
 
If I have a DB where I need to keep track of state like "Submitted" is it better practice to use a single (datetime?) column like SubmissionTime vs having both a boolean and datetime? column?
 
depends.
can things become unsubmitted?
do you need to know the difference?
are there other statuses?
 
sure.
but with a nullable datetime if something is unsubmitted you could make it null
 
but do you need to know "this was submitted yesterday but rolled back?"
in which case having both will tell you that
 
5:32 PM
sort of.
even that case isnt perfect.
 
6:15 PM
I can't find the app.config file
where it should be?
 
@QuicoLlinaresLlorens in your project
 
sorry
web.config file
 
same
@QuicoLlinaresLlorens although web.config will only be generated for web projects
 
AHH
ok
So, it is possible to change something in the app.config when it is running the application?
 
So I created basically a Digital Attendance sheet/tracker website. There can be multiple events in a year obviously, do you think it makes more sense to create a different database for each event and point the website to different databases?
or have 1 database with multiple attendance record tables?
@QuicoLlinaresLlorens umm... maybe
 
6:25 PM
ok thanks
 
Anyone used this for their project yet? dotnet-security-guard.github.io
 
Do you guys prefer CHM files, Website, or some alternative for API/Development documentation?
 
@mikeTheLiar the sizeable bounty I put on it doesn't seem to have made a difference
@QuicoLlinaresLlorens changing the file won't update the value in the app's config collection while it's running but I think you can overwrite the value in code
@QuicoLlinaresLlorens can you give me your WSDL URI, I want to try this
I cannot believe it can be this difficult
 
@TomW It is in local
But the problem is that I could have several clients
so I can't use add reference
 
How are those two things related?
Why does having several clients prevent you from using Add Reference?
 
6:40 PM
Because The clients will input the IP and the Port of his wsdl page
and I have to access
Because I only can use
I mean
I can't create WebReference at runtime
or edit the one I have created
because I need to change the app.config file
 
No you don't, Add Service Reference creates a client for you whose constructor takes an address
public MyClient(string endpointConfigurationName, string remoteAddress)
 
yes
but I can create one dynamically?
 
What do you mean by 'dynamically'?
Wait
 
await
 
Are these multiple instances of the same service, or entirely different services?
That you don't know at design time?
 
6:55 PM
I mean do it with code that is executed in the moment
are not the same service
it really use the same WSDL, but every client has the WSDL in its own machine
 
OK, and you are sure they are always identical?
 
Then yes you can use the same client class, and just give it different URLs each time you instantiate it
 
although the WSDL for client 192....14 and 192....16 is exactly the same , when I use the 14 I will be able to change files in the 14, and when I use in the 16, the same, but in the 16
 
what files?
 
6:58 PM
I change files that the machines have
.txt
and I get some values from the files
 
OK, that is the service's purpose?
 
Well yes, the request will go the machine whose IP you supply
 
yes
but I don't know how to change the reference that VS generates
 
I just told you how
 
6:59 PM
in order to changing that IP
 
Use the constructor overload for the client class that takes a URL
string remoteAddress
that's the URL
 
ok, sorry
But I haven't that method
Or, I don't know where to look for it
I have the reference in the Web Reference folder, not the Service one
I don't know if it changes something
 
There should have been generated a [ServiceName]Client class in Reference.cs
what version of Visual Studio do you have?
Web Reference is really old
I have the menu option for it but I can't click it
not clear why
 
I have visual studio 2015
this is what I see in the Web Reference folder
 
7:15 PM
aah I have it
they've tried really hard to stop you using it because it is really out of date
there's a hidden option to generate a web reference anyway, I have reproduced what I think you have
 
yes, all I do at University is out of day hahaha
Let me say that you are the boss
 
OK so the class it generated for me has a Url property
public new string Url {
    get {
        return base.Url;
    }
    set {
        if ((((this.IsLocalFileSystemWebService(base.Url) == true)
                    && (this.useDefaultCredentialsSetExplicitly == false))
                    && (this.IsLocalFileSystemWebService(value) == false))) {
            base.UseDefaultCredentials = false;
        }
        base.Url = value;
    }
}
have you tried setting that, if so, does it work?
 
where do you find it?
 
== true
== false
== false
We're not friends anymore.
 
I have no classes in Web References folder as you see
in the link of the picture
 
7:18 PM
there is a 'Show All Files' icon at the top of the solution explorer
It's trying to be 'helpful' by hiding stuff that if you changed you could break stuff. Thanks Microsoft
 
Really thanks
OMG
All was doing a click..
:(
I have been like 3 or 4 days with this
 
does it make sense for me to say "Epifanía"?
or is that a bad translation
 
I don't know even what it means in spanish
jajajaja
 
blame google
 
yes
I think you are right
it is a epifania
jajajaja
I hope that I don't disturb here any more
 
7:22 PM
:D
no worries, glad you figured it out
 
me?
30
 
Im 20, nice to meet you
 
you too
 
Can I get JSON.NET to deserialize to something more appropriate than a JArray for object variables? As in List<string> for ["Foo","Bar"], List<int> for [1,2,3] etc.
I'd prefer to leave out type information from the JSON itself
 
7:26 PM
I think Deserialize is a generic method you can pass a destination type to, from memory?
does that work?
 
@TomW The type is unknown at compile time
 
well shit
MakeGenericMethod
 
Ideally it determines which type to create based on the JSON
 
.Invoke()
 
@TomW The type is also unknown to C#
 
7:28 PM
!!tableflip
 
@TomW That didn't make much sense. Use the !!/help command to learn more.
 
I'm not sure what you're asking in that case
oh, maybe I understand
So you'd like it to be able to figure out that "Foo" is a string and not a JToken?
 
As an example, I'm calling DeserializeObject<Foo> where Foo has a property of type List<object>
 
Well JArray is IList<JToken>
and JToken : object
 
I don't want the list to end up full of J* objects
I want Guids for values that are guids, List<string> for values that are arrays of strings, etc.
 
7:34 PM
@TomW I think last question :D. You said that I have a WebReference client object created? But where can I see that object in order to do the set to the URL?
 
@QuicoLlinaresLlorens well you'd write code that creates one
What's your service called?
 
ahh ok
WebReference
 
var webReference = new WebReference();
webReference.Url = ???;
 
I have to use it in the Form?
It says that WebReference is a namespace
 
OK, what's in that namespace?
At least one of the classes generated should be a client
 
7:38 PM
yes
Sonda
but I try with Sonda and I get the same
I have a public partial class Sonda
Exactly this:
public partial class Sonda : System.Web.Services.Protocols.SoapHttpClientProtocol
 
So does Sonda have a property called Url?
 
yes it has
ok, I need to import the namespace
 
yep
 
then create a "Sonda" -> var sonda = new Sonda();
and sonda.url = ??;
 
exactly
 
7:44 PM
so, I should have it
thanks
I am going to watch football
then I will continue with this, but I think I have it finally
 
 
1 hour later…
Dan
8:57 PM
Is it just me, or is creating NuGet packages unnecessarily complicated?
 
unnecessarily? shrug
necessarily complicated, well, probably
 
Dan
9:15 PM
Oh, apparently I was just complicating it, lol
 
Hey guys, just looked through the star messages... should we flag this? chat.stackoverflow.com/transcript/message/34447900#34447900
You know, for security reasons? lol
@MikeAsdf dude, how's Xamarin development coming along? What are you working on now?
 
@KalaJ flag away
 
9:33 PM
flagged haha
 
don't public flag shit
mod flag for that
public flag system will just think you're all silly for flagging that shit
 
Oh hey r-mister-never-comes-around-anymore
-lemon
 
I'm always lurking
 
1 message moved to Trash can
1 message moved to Trash can
 
9:49 PM
@rlemon is there an easy way to pause the dark chat extension?
 
incognito window
 
Yeah that's what I usually do but I wanted to stay logged in this time.
 
@mikeTheLiar - $("style").remove();
;)
 
Disabling the extension in chrome seems to be easiest
 
yup
 
9:50 PM
Also non-dark chat is blinding
 
right?!
after using dark for a while goin back is painful
 
Need more feng shui
 
We give thanks to you, blessed lemon of man, for this extension for without it we are lost. I was blind but now I see.
Then I turned it off and now I'm blind again.
 
Are you in a dark room?
 
yup
 
9:52 PM
Well it's Boston in November so the sun sets around 3:45
 
Makes more sense I suppose
 
All of my IDEs are dark themed
 
Tape a LED strip along the top of the room where it meets the wall and set it to a dim controller :D
 
even in a light room, I get ocular migraines from bright lights.
sometimes switching from chat to main is enough
 
A little too sensitive? :P
 
9:53 PM
kinda
it's a neurological thing.
 
Migraines suck though, to be honest
 
no pain, I just can't see
 
Oh wow, even worse
 
I get auras in my vision and they take over for a bit
 
I notice when one of the lights in the room is burnt out by the headache, not the dimmer room
 
9:54 PM
I had that once
 
happens to me ~once a week or so
lasts 20 minutes - 2 hours
 
@rlemon - It was because I had damaged my Atlas, have you had any neck trauma?
 
nope
this has been happening since I was a teenager
been to many docs about it
 
Do you have an enzyme imbalance?
 
as far as their aware, it's 100% neurological and pushing it further might mean I lose my driver license
so I avoid bright lights, and deal.
 
9:56 PM
I get migraines occasionally. Hasn't happened in a while. Usually it goes visual artifacts -> blurry vision -> cold sweats and nausea -> vomiting -> nap for 4 hours
 
yea, I just get the visual impairments
 
Wake up feeling great. Everything up until that point sucks panini-holder.
 
well, I get regular migraines occasionally as well. I have to imagine most people do occasionally
 
I think you might be surprised about that.
The number of people who think it's a "really bad headache" is surprisingly high
 
Migraines are not common. Most people don't get them, but those who do tend to get them chronically depending on circumstance.
 
9:58 PM
I get dull sinus headaches, or migraines
no inbetween
 
I haven't had one in quite a while. At least several years.
Knock on wood.
 
10:15 PM
I often get interrupted at work, so that is where the delay comes from
 
So I'm getting an error on my production machine "Cannot start the driver service on localhost:xxxxx when trying to load up PhantomJS in a console application. I get the message "PhantomJS is loading up GhostDriver" and then I get a couple "operation has timed out" messages.
anyone know what could be causing this? "it works on my (local) machine"
 
Did you make sure all of the required files were deployed and have the right trust levels?
 
just moved files from bin to bin
but...
one second
i do remember having a whole bunch of "adds" and having to do some sort of workaround on my local machine when i got the project
fml... the previous dev switched from phantomjs to htmlweb (whatever that is), didn't clean up the mess, and i've been developing with phantomjs this whole time.
so... figure out why phantomjs isn't working and fix that... or redo my work to use this other library...
 
Option 3) Quit your job, flee the city, live in a cave hunting and gathering what you need to survive.
 
@mikeTheLiar - Option 4) Option 3, except by competing on the show Alone.
 
10:25 PM
that's tempting too lol
but the thing nagging at me is... why does it work on my machine and not the production server?
 
Restore on build, I'm guessing
 
but if that's the case, wouldn't it show up in the bin folder?
 
Depends on how the package is set up
 
Does anyone here have any experience with distributed caching in c#?
 
Could you possibly be a bit more specific?
 
10:51 PM
All I know is that all problems are caused by caching and fixed by turning it off and on.
 
Stop writing checks that your app can't cache.
 
@jth41 - Are you using a separate server for caching or just the app pool's memory?
 

« first day (2244 days earlier)      last day (2707 days later) »