« first day (1406 days earlier)      last day (3544 days later) » 

6:00 PM
Just to find out: assumption incorrect
 
@RoelvanUden I was going to do that later, but I'm on a dead line.
 
were always on deadlines >_>
 
Where should I put that code?
Yeah, the HttpWebRequest is always null.
 
New project => console app => create, paste
 
        private bool DownloadPod(string from, string to)
        {
            var request = WebRequest.Create(from) as HttpWebRequest;
            if (request == null)
                return false;

            var response = request.GetResponse();
            if (response == null)
                return false;

            using(var stream = response.GetResponseStream())
            {
                if (stream == null)
                    return false;

                stream.CopyTo(File.OpenWrite(to));
 
6:05 PM
and what is from
 
6:17 PM
Hi. May someone please help me with configuring endpoint for WCF?
 
@Marek I'll see what I can do
 
the value from reader[@"SignaturePath"] is:

"\\\\Qp400\\400\\MincronImage\\S123.jpeg"
@RoelvanUden ^
 
@TomW well here is the code: gist.github.com/mareksip/91bae6663a5fc19e994e but I still get the metadata publishing is disabled :/
 
@Marek is the service itself working?
 
@TomW how may I test it?
 
6:24 PM
post something to it
you can use something like soapUI or PostMan to create post requests with arbitrary content, if the service is up I'd expect you to get a soap fault back
 
Is it because it doesn't have the "http://"
 
obviously I don't expect you to exactly synthesise the soap message the service wants without being able to get the metadata, but submitting an incorrectly formatted message should show you whether it can respond at all
 
@Greg you mean the addresS?
 
@Greg I don't think so, relative addresses are supported
what does look odd is that you have an http base address defined but there's also a tcp binding in there, I don't know what that does off the top of my head
 
@TomW Who are you speaking to?
 
6:28 PM
@Greg and @TomW this is the working one: gist.github.com/mareksip/30d04f38fb71454e3f81
@TomW me neither it was in msdn documentation. I will try to delete that part.
 
> If you do not enable this property and do not change HttpGetUrl or set it to a relative address, an exception is thrown at runtime when the service host is opened without a base address for HTTP.
 
@RoelvanUden Why would that path appear null
 
@Marek the doc isn't 100% clear but I think it's saying it expects you specify HttpGetUrl. I thought I'd seen services configured without that, but it's worth a try
 
@TomW you mean to add this part: <serviceMetadata httpGetEnabled="true" httpGetUrl=""/> ?
 
yes
 
6:33 PM
 
I'm gonna try and mock up your config myself and see what I can figure out
 
isnt that because of the / at the end of url?
 
Greetings.
 
Thanks alot @TomW
 
@Greg That's not a http request ...
 
6:35 PM
@TomW Still no changes when I delete '/' at the end.
 
@RoelvanUden But that is what I'm trying to do, grab a file from a local server and push to a client to download.
 
Could someone share the reason behind the existence of this warning? msdn.microsoft.com/en-us/library/vstudio/…
 
@RoelvanUden Then what approach should I be taking?
 
Wait...
Nervermind.
I figured it out.
I hope nobody replied whilst I just lost connection. :L
 
@RoelvanUden I've got this local path, I've got the data on accessible on our server, but when a user opens it, it fails. It won't download the file.
 
6:42 PM
@TomW I have reduced the config to: gist.github.com/mareksip/91bae6663a5fc19e994e but still no success.
 
where and how are you getting the error message?
I've got a different one, but I don't know how yours is hosted, etc
 
@TomW getting the metadata publishing is disabled :/
 
WHERE
 
On IIS but uplading files with ftp .
 
posted on August 22, 2014 by Jon Skeet

A comment on a Stack Overflow post recently got me delving into constants a bit more thoroughly than I have done before. Const fields I’ve been aware for a while that although you can specify decimal field as a const in C#, it’s not really const as far as the CLR is concerned. Let’s consider […]

 
6:49 PM
AHA
<service name="FtpWebService.IService1"
 
@TomW might the element base address help?
 
IService1 is an interface. Pretty sure the runtime tries to instantiate whatever you put there
Change that to the implementing class
 
@TomW To just FtpWebService.Service1 ?
 
is that its name?
I bet this is one of those useless microsoft error messages that doesn't tell you anything remotely related to what the actual problem is
 
Uh, an error.
 
6:52 PM
@RoelvanUden When I attempt to go straight to that path it says Access Denied; I can't even impersonate with valid credentials to access it.
 
@TomW Attribute 'binding' is required on element 'endpoint'.
 
Well yeah, it is
I don't see anywhere that you don't have a binding supplied to an endpoint in your last gist, what have you changed?
 
@TomW Any ideas for my problem?
 
@tl;dr, whats the problem?
 
@TomW Yes I did and fixed that problem. Now got a band new error!
A binding instance has already been associated to listen URI 'http:///WShosting/Service1.svc'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.
@TomW just edited my gist, not sure what is wrong with this.
 
6:58 PM
@Marek yeah, multiple http endpoints with the same relative address. How would the runtime know where to send a request?
 
@TomW aand its working! Thansk a lot!
 
what did you change?
 
I left only
   <endpoint address=""
    binding="wsHttpBinding"
    contract="FtpWebService.IService1" />
@TomW It was that name problem I think, please see: gist.github.com/mareksip/91bae6663a5fc19e994e for final version :)
 
yeah, that looks fine to me. Now if you add back in the ftp endpoint you wanted I don't think that will be a problem
 
@TomW I've got a file on a local server, remote from my web. I have direct file access to the path, but anytime I attempt to have someone click to download the file it says: Access to local resource not allowed.
 
7:02 PM
what's 'it'?
 
@TomW is that even important to add it?
 
@Marek I don't know, is it?
Do you want ftp or not?
 
@TomW I think I don't, heh :)
 
@Greg not even google recognises that error message, looks custom
 
@TomW Well, how about this:
Access to the path '\\qp400\qp\MincronImage\S123.jpeg' is denied.
I'm trying to impersonate with valid credentials, still nothing though.
 
7:12 PM
crumbs, no idea. Could be anything
anything else currently have a lock on it?
 
Nope, totally starting to annoy me though.
I'm getting annoyed when I can't access this stupid local path
 
is anyone explicitly denied on that file?
 
No.
 
hello everyone
is anyone of yu is on unity also?
 
I have server one, that is where my image file is. From server two, when a user clicks View Signature it logins into server one to grab the file, then download to the users machine.
 
7:18 PM
@UnityBeginner I've used Unity and Castle Windsor, but I am using Autofac now. What's your question?
 
actually i started unity
n am not finding anyone in unity room
i am trying to set background
 
@Greg is that a local account or a domain account you're impersonating?
 
I am following this link
@MarkRichman
I added the sprite folder
under the topic 'Add the texture to the sprite' it is telling how to set wallapaper
but the image i have is in the D folder how it will show in select sprite dialog
 
@TomW Domain.
 
@MarkRichman can you pls tell?
 
7:22 PM
@TomW Code:
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
    public class Connect : IDisposable
    {
        private readonly TokenHandler handle;
        private readonly WindowsImpersonationContext context;
        const int LOGON32_LOGON_NEW_CREDENTIALS = 9;

        public Connect(string username, string password, string domain)
        {
            var valid = LogonUser(username, domain, password, LOGON32_LOGON_NEW_CREDENTIALS, 0, out this.handle);
            if (!valid)
            {
 
Beyond me, not done impersonation before
 
@UnityBeginner What does your question have to do with Unity?
Why not use the NuGet SimpleImpersonation package? Works fine for me.
 
@MarkRichman i started studying unity today
 
@UnityBeginner Unity has nothing to do with graphics
 
n i am learning from this link
n trying to set background but not able to do that
can yu pls tell how may i do that?
 
7:32 PM
    @TomW I think either that server, or IIS is blocking something.  I did it this with another server:

var desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
using (Connect impersonate = new Connect(@"acc", @"a2352", @"\\qp400"))
 new WebClient().DownloadFile(@"\\svr-web\inetpub\ProductImages\Training\Pod\Mincron\images.jpeg", Path.Combine(desktop, @"Signature.jpeg"));

    And it worked.
 
@UnityBeginner This is a totally different Unity than anyone here will be able to help you with. We all know this Unity: unity.codeplex.com
 
its ok mark i'll try self thanks for giving yur precious time
good night
unity 3d is game engine
 
@UnityBeginner This is not the correct chat room for that tool, sorry.
 
its ok mark, i asked here becos the prog lang i.e used in unity is c#
 
@Greg I was unaware that WebClient worked for non-HTTP
@UnityBeginner I understand, but product-specific questions are probably too specific for this room
 
7:38 PM
@MarkRichman What? How is C# the wrong room for Unity questions?
 
@KendallFrey Different Unity :)
 
Which one?
 
some 3D game engine
 
Unity 3D is fine here
 
7:38 PM
bye
 
it uses C#
 
@TomW just found out that that webservice doesnt return any data :( :/
 
ok then i apologize
his question just had nothing to do with C# or any .NET-isms
he was asking about a particular designer tool for that framework
 
0
A: How to enable a disabled control on click

GregYour button click shouldn't be private, it should be protected. Second I believe if that doesn't work, you can't use a disabled button to enable the button. You would have to use another button: btnGridPSR.Enabled = false; protected void btnGridStatus_Click(object sender, EventArgs e) { b...

 
@Marek empty soap message or literally nothing?
 
7:41 PM
I have a simple method there
  public string GetData()
        {
            string rstring = "a";

            return rstring;
        }
 
that's not marked with a contract attribute
needs [OperationContract] IIRC
otherwise the runtime is like "yep, I did it. I sent a message nowhere and there was no problem"
 
you need an interface marked as [ServiceContract] and it's methods each marked with [OperationContract]
 
That is what I have in IService1.cs :o
should I put it in Service1.svc.cs too?
 
not necessary
 
call it something other than Service1 please
 
7:45 PM
public interface IService1
{

[OperationContract]
String GetData();
 
where is your [ServiceContract] ?
and yes, name it something humane :)
 
So it will become
 [ServiceContract]
        public string GetData()
        {
            string rstring = "a";

            return rstring;
        }
 
or just return "a";
 
this one ?
 
no
[ServiceContract] is an attrib of the interface
 
7:46 PM
operationcontract on the methods amigo
 
you should read Juval Lowy's book :)
 
My Iservice1.cs looks like:
[ServiceContract]
public interface IService1
{

[OperationContract]
string GetData(int value);

[OperationContract]
CompositeType GetDataUsingDataContract(CompositeType composite);

// TODO: Add your service operations here
}
Service1.svc.cs is:
public class Service1 : IService1
{

public string GetData()
{
string rstring = "a";

return rstring;
}
 
What are you attempting to do @Marek ?
 
Just return a to my test console application.
 
Well Service1 doesn't implement IService1
you're missing an argument on GetData
 
7:49 PM
Oh, sorry I deleted that argument.
I will try it now.
 
I need to spit raw html code back out to the browser...how is this done
 
Oh! I encountered error when generating .cs file with wsdl.exe
 
I tried using a label...does not work
 
Warning: This web reference does not conform to WS-1 Basic Profile?
Well it is still not returning any data :/
Does that Warning has something to do with it?
 
is it possible return HTML as text with tags?
 
7:56 PM
@Skullomania what do you mean by return?
 
@TomW so I want a user to see this <h1>Hello World</h1>
 
needs html escaping, otherwise the browser will treat it as markup
 
@TomW tags and all without actually having the page render it in a header
 
HttpServerUtility.HtmlEncode does that IIRC
 
Any help would be appreciated: gist.github.com/mareksip/6e23368a3581d8f04431
thos are my Iservice1.cs and Service1.svc.cs
I can initialize the connection but it doesnt return any data.
        testwcf.Service1 svc = new testwcf.Service1();
        string c = svc.GetData();
        Console.WriteLine(c);
It stops on second line without exception :/
The endpoint settings might be wrong?
 
8:33 PM
stops ON the svc.GetData() or after it?
i.e. does the function return?
 
The endpoint was not correct.
 
your gists are not visible
 
dudes and dudetes
a challenge if I may
 
i dont do ice bucket challenges dude
 
I like the PEE Pipeline<T,T>
I am sick of #icebucketchallenge
anyhow
 
8:34 PM
i want to see a Liquid Nitrogen challenge
 
what would be best way to pass state into the Pipeline ?
like with Task<T>(.., objectState)
should I subclass ?
 
not sure what Pipeline<T,T> is
 
ok like a pub/sub mechanism. cool.
 
yup
pretty much
 
8:36 PM
a bus, if you will
i know Tasks can have their own state
 
I have some config info, which I want each step to have access to
 
right, but I want the Pipeline to have its own
 
its just this blob you can dump shit into and cast
subclass Pipeline<T,T> and add it?
 
sound right, right?
 
8:37 PM
ah ok i see
is a singleton too simple?
 
I can have multipl epipelines running
each with it own config
 
then maybe you need to either compose a class containing both the Pipeline and PipelineConfigInfo (or whatever you call it) or derive from PipeLine and add ConfigInfo as a property of the subclass
the former being a facade around Pipeline<T,T>
 
It seems I can't subclass from Pipeline
so Facade is an option
 
why not just copy the class and modify it? it's not that much code code.msdn.microsoft.com/Samples-for-Parallel-b4b76364/…
modify public class Pipeline<TInput, TOutput> and add your config info as a private
unless i'm oversimplifying because i'm ignorant
are the tasks in the pipeline aware of the pipeline context?
 
they need to be
so copy is actually a cool idea
public class StatefullPipeline<TInput, TOutput>
 
8:47 PM
im asking if in the current behavior a Task knows about its enclosing pipeline
Stateful not Statefull ;)
 
oops
 
and that's what i was going to suggest as a name for you too :)
 
        private readonly object _state;
?
 
why not?
how will a Task in the StatefulPipeline access _state?
 
property with a getter
this.State
 
8:50 PM
i guess i dont know how Pipeline works
 
how about
 
in my mind you have a Task that you somehow inject into the Pipeline
 
public class StatefulPipeline<TInput, TOutput, TState> ?
 
sure and then private readonly TState _state
 
to avoid testing for null and unboxing
darn
that affect the Next method
Hmm
no worries
 
8:58 PM
So, I hadn't really fooled with WPF. Then, today, I started. At first I was getting the impression it was like the HTML/CSS model but for desktop applications. Then, I realized it was like the HTML/CSS model had gone through a blender with 2 cups of hellfire and 3 tablespoons of assorted neurotoxins.
 
I take from this that you are not a fan
or maybe that's a compliment. It's hard to tell
 
You had it the first time.
 
I absolutely HATE HATE HATE WPF!!! But I love it dearly compared with WinForms. What does that say?
 
In typical MS fashion: "Oh, you'll find it familiar, it's like HTML/CSS (by the way, it's not actually at all)"
@MarkRichman Frankly, WinForms is easier to grasp.
 
Yeah it's exactly like HTML/CSS if HTML were Spanish and CSS were dancing.
oh i agree WinForms is WAY easier, but WPF is more powerful if you can get past the obscene learning curve
 
9:02 PM
Yea, that's pretty much where I'm at now, the obscene learning curve.
 
yeah it's criminal
 
More specifically, the bottom of said curve.
 
I like it. I don't get it, but I like it.
 
if you try to understand MVVM then it makes more sense
i'm 4 months into my WPF learning
 
True, I'm unfortunately in a "ship it yesterday, but start it today" kinda situation.
 
9:03 PM
and i think i am at a 5/10 in my understanding
im in the same boat
went from zero WPF knowledge to a potentially shippable application shortly
 
Maybe someone can advise: my company has a fuckton of shitty touch-screen kiosks. Right now, they're XP with a fullscreen C++ application running that is actually a COM loaded Flash player. So the actual GUI/content is an SWF.
I'm trying to basically "ground-up" this whole debacle.
 
is a fuckton like 10^amazeballs ?
 
ugh, POS on windows is instantly a bad idea.
 
@DanLugg you're looking for a technology replacement?
 
They're not POS, they're just informational kiosks.
 
9:05 PM
stick an ipad behind some glass and call it a day lol
 
Because you know every so often it'll go "ZOMG right now I need to show a dialog NOWHERE and obviously whatever I'm currently meant to be doing shall be unusable"
 
So I originally started writing a .NET WinForms application to act as a host to a (more up to date) Flash component, and then rewrite the stuff in Flash 11 AS3 again.
Basically, the same approach as before, but y'know, better.
Then I started thinking that maybe WPF would be a better choice.
And now I'm looking at both (potential) solutions with a gun.
@MarkRichman I would if I could.
@MarkRichman Essentially yes.
So, yea. That's my story.
 
why does it have to be a desktop app? why not a fullscreen web app?
at least you'd be able to easily do remote updates
 
I swear, the number of times I've seen an ATM with a taskbar and a dialog complaining about antivirus definitions
 
^^ lol, same.
 
9:08 PM
i remember when banks were smart and ran OS/2 everywhere
 
It doesn't have to be a desktop application, but I'm thinking it might just be easier.
 
without knowing your requirements its hard to give a sound recommendation
 
Without knowing my requirements, it's hard to give you my requirements ;-)
 
9:42 PM
Now I have to pay it to myself
Done
thoughts?
does not work
New version posted
 
10:00 PM
Has anyone else encountered a problem where the Visual Studio editor window will not accept any keyboard input (but menus still work and one can type in the Find box , etc.)?
 
Have you tried turning it off and on again?
 
Interestingly, right clicking on the editor window area cuases the window to stop responding for about 20 seconds and CPU usage goes up to close to 20% for that time.
Yes
Restarted VS and the computer. No change
 
That is indeed strange
 
One thing that I have been doing lately is troubleshooting an IIS/IIS Express problem and I had to restore to a restore point twice. The restore point was the day before yesterday and no updates have been installed since then or anything like that.
Maybe it jacked with my extensions...
 
Do you have any 3rd party plugins which might cause this behaviour?
 
10:04 PM
Yeah, a few. Resharper, Altassian connector, Git Provider, etc.
One never knows what all those things are doing,
I'll make a list of the extensions, uninstall all of them, and then reinstall them one by one.
 
 
2 hours later…
11:45 PM
Alright. Running a repair on Visual Studio appears to have fixed whatever problem it was having.
Uninstalling extensions and plugins did not do anything.
 

« first day (1406 days earlier)      last day (3544 days later) »