|
Permissions, firewalls, User Rights Assignments, missing DLLs....
If it works in one place and not in another, it's generally one of two things: configuration or runtime support
The Event Viewer is your friend. You can also drop some debug lines into your client to find your failure point.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
As I say the same WCF client works with the same webservice in other machine
But with the one created and hosted (which works on browser !!!! ) in my machine it not works and I have the Exception "EndpointNotFoundException"
|
|
|
|
|
Yeah....that's why I suggested that you have an environmental factor. Check the firewall.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
so, it seems to be resolved and it related to configuration of my IIS
Thank you for help
|
|
|
|
|
I have a simple SignalR app that runs fine when self hosted or hosted in VS2015's IIS.
When I attempt to host it in full IIS I don't get very far. Here's my connect code:
public void Connect()
{
_connection = new HubConnection(ServerUri);
if (_enableDebugging)
{
_connection.TraceLevel = TraceLevels.All;
_connection.TraceWriter = Console.Out;
}
_hubProxy = _connection.CreateHubProxy(HUB_NAME);
_hubProxy.On<string>("EchoMessage", EchoMessage);
_hubProxy.On<AssayDashboardInfo>("ResultsAdded", ResultsAdded);
_hubProxy.On<AssayDashboardInfo>("ResultsChanged", ResultsChanged);
_connection.Error += _connection_Error;
_connection.StateChanged += _connection_StateChanged;
try
{
_connection.Start();
}
catch (Exception e)
{
_logger.Error("*** Connection failed", e);
}
}
I get no error messages or exceptions. What I DO get is some output in the Console Window:
23:57:41.8538683 - null - ChangeState(Disconnected, Connecting)
23:57:42.0208850 - null - Disconnected
23:57:42.0208850 - null - Transport.Dispose()
23:57:42.0218851 - null - Closed
Again, with no exception or error info I can only assume that it's not finding the hub. The _connection_StateChanged event is called twice - first with "Connecting" then immediately with "Disconnected." And that's as far as I get.
At this point I'm reaching out to see of anyone know what these messages mean or what I'm doing wrong.
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Just a guess, but it is probably a permissions issue related to the account that is running your Application Pool in IIS. That is the account the code will execute as.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
But both VS2015's IIS Express and the full IIS are both running on my Dev PC under my account
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: VS2015's IIS Express This runs as whatever account you are logged into the machine with.
Kevin Marois wrote: full IIS You have to look at the application pool's identity.
If they truly are the same, then I'm not sure where to look next. Event logs?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The app is using the DefaultAppPool, and it's Identity is set to ApplicationPoolIdentity under Build-In Account.
How do I know what account VS's IIS is running under?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: it's Identity is set to ApplicationPoolIdentity Perhaps try an account that is a domain admin account or at least an admin on the machine. Your account that you log onto the machine with might work.
Kevin Marois wrote: How do I know what account VS's IIS is running under? Because it runs under the context of VS, which is loaded as a UI app using your account.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The only IIS logging I got was:
Software: Microsoft Internet Information Services 7.5
Version: 1.0
Date: 2017-01-06 16:58:50
Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2017-01-06 16:58:50 ::1 GET /signalr/negotiate - 5396 - ::1 SignalR.Client/1.0.0.0+(Microsoft+Windows+NT+6.1.7601+Service+Pack+1) 404 0 2 151
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: 404 0 2 151 That means Url not found. Are you sure you have it configured in IIS correctly?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
RyanDev wrote: Are you sure you have it configured in IIS correctly?
No. That's been a real problem as there are no tutorials that I can find that ACTUALLY show a SignalR service being hosted in IIS. Google and other people point to this which shows how to CREATE an app that runs in IIS, but doesn't actually SHOW you how to host it in IIS.
One thing I did discover is that I was not Awaiting the Connect method nor the _connection.Start. Once I did that I now get an exception:
StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Cache-Control: private
Date: Fri, 06 Jan 2017 17:46:14 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Content-Length: 5265
Content-Type: text/html; charset=utf-8
}
Which is just as useless as the prior message.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: 404, ReasonPhrase: 'Not Found' Still tells me something is not configured right.
Kevin Marois wrote: there are no tutorials that I can find that ACTUALLY show a SignalR service being hosted in IIS. This looks like it might be it, Hosting a SignalR application on Windows 2008r2 and IIS 7.5 – Timlee's Blog[^]
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I've already been through that page. It doesn't really apply as I'm not doing a web app. My client is WPF. I did had the Config item, but everything else doesn't apply.
Thing is, I have this running on my home sever. I just can't get it to run on IIS on my Dev PC here at the office.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I'm trying to set up error handling in my SignalR app.
This leads me to believe that when I call a method on the server that doesn't exist, I should be able to CATCH an exception for it.
I've done exactly what the example code shows, yet neither the Error event nor the try/catch ever fire:
My Connect method:
public void Connect()
{
_connection = new HubConnection(ServerUri);
_connection.TraceLevel = TraceLevels.All;
_connection.TraceWriter = Console.Out;
_hubProxy = _connection.CreateHubProxy("DashboardHub");
_hubProxy.On<string>("EchoMessage", EchoMessageReceived);
_hubProxy.On<AssayDashboardInfo>("ResultsAdded", ResultsAdded);
_hubProxy.On<AssayDashboardInfo>("ResultsChanged", ResultsChanged);
_connection.Error += ex => Console.WriteLine("ERROR!!!!!!!!: {0}", ex.Message);
_connection.StateChanged += _connection_StateChanged;
try
{
_connection.Start();
}
catch (Exception e)
{
throw;
}
}
then later I do:
try
{
_hubProxy.Invoke("NotARealMethod");
}
catch (Exception e)
{
throw e;
}
What I DO get is a bunch of text in the Console window which includes
"OnMessage({"I":"0","E"
:"'NotARealMethod' method could not be resolved. No method found with that name.
","T":" at Microsoft.AspNet.SignalR.Hubs.NullMethodDescriptor.<get_invoker>b__
6_0(IHub emptyHub, Object[] emptyParameters)\r\n at Microsoft.AspNet.SignalR.H
ubs.HubDispatcher.Incoming(IHubIncomingInvokerContext context)\r\n--- End of sta
ck trace from previous location where exception was thrown ---\r\n at System.R
untime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at Syste
m.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(T
ask task)\r\n at Microsoft.AspNet.SignalR.Hubs.HubPipelineModule"
Anyone have an ideas on what's wrong?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
In case anyone's interested, this works:
ubProxy.Invoke("NotARealMethod", message).ContinueWith((t) =>
{
if (t.Exception != null && t.Exception.InnerException != null)
{
throw t.Exception.InnerException;
}
});
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I want to use javascript and css into my mobile AMP pages, while i am using external script and css, AMP validator shows validation result as "Fail". Could you please help me to resolve this issue.
|
|
|
|
|
Is it possible to make a browser based app without dependence on a particular browser?
If yes please suggest the possible way?
If not then what are the alternate, I need a small application where user will not need to log in again and again, once logged in then he/she can do use that.
I made a Chrome browser widget but client needs without depending upon particular browser.
Any suggestions?
Thanks
|
|
|
|
|
HTML/CSS/JavaScript
Use only the parts supported by all major browsers...
Use some libraries, supporting all the browsers you want...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Almost every web application is build neglecting the browser dependencies; CSS and JavaScript run natively on browsers just a difference of a bits come in action. Such as, how a CSS render a pixel and so on. Otherwise, how much APIs do JavaScript engine support etc. Otherwise, there is not much difference in the other all application development. The proof for this is: CodeProject runs on all the browsers.
Just create a simple web application, you may use ASP.NET for that, it will have authentication, dynamic page generation, database connectivity etc. all set up for you. You can then move onwards and develop your own logic to run in that application.
Read this to get started, Understanding ASP.NET MVC using real world example, for beginners and intermediate
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
i meant extensions which i can download in browser
|
|
|
|
|
They are definitely browser-based, until now there haven't been a platform to write cross-browser extensions.
Chrome and Opera share the same API, so you may use it, Firefox is a bit of different beast and that is when you might require some third-party tooling, which is not guaranteed to work with everything but will give a good way to start.
Kango cross-browser extension framework
Cross-Browser Extensions API? - Stack Overflow
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Alright, thank you 
|
|
|
|
|
When you're looking at implementing a feature that has a complex central element (like BLOB), you can always check: Can I use... Support tables for HTML5, CSS3, etc
Most features do have shims for cross-browser support, but I tend to avoid those for overhead reasons. Better to make it play nice at a basic level, IMO.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|