Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Install Glimpse now I cannot add service references? #892

Closed
KevinBurton opened this issue Mar 26, 2015 · 20 comments
Closed

Install Glimpse now I cannot add service references? #892

KevinBurton opened this issue Mar 26, 2015 · 20 comments

Comments

@KevinBurton
Copy link

glimpse
I installed glimpse and now I get a warning and an error when adding a service reference that Glimpse 1.8.2 could not be found or loaded. I looked in my packages folder and I have Glimpse 1.8.6 installed. Apparently there is still some reference to 1.8.2 having to do with adding a service reference in Visual Studio but I have not been able to find it. Ideas?

@CGijbels
Copy link
Collaborator

@KevinBurton Can you give me the list of Glimpse related NuGet Packages installed in the project where you are adding your service reference?

Just check the packages.config file

My first idea is that the custom tool generating the client classes when adding the service reference, is not talking the web.config into account, where the binding redirects are being configured. Most likely it is loading all assemblies in the project's bin folder into memory and applying some reflection upon it, hence a specific Glimpse assembly, one depending on Glimpse.Core 1.8.2, is loaded, but since the bin folder most likely contains a newer version of the Glimpse.Core and there are no binding redirects defined for that custom tool process the tool crashes

I'm not sure if that can be solved directly, and somehow I guess other assemblies added by means of NuGet packages might have the same problem, but to be sure we first need the information above to try to reproduce it, just to make sure that is actually the problem

@KevinBurton
Copy link
Author

I have attached the packages.config which should give you an idea of the packages that I have installed. Ntoice that the config file seems to have it right. it is referenceing 1.8.6
glimpse

@KevinBurton
Copy link
Author

By the way I have tried rebooting to eliminate the possibility of something loaded in memory. I didn't notice any Glimpse related assemblies in the GAC. But as you said it may be another assembly that references an older version of Glimpse.

On Mar 26, 2015, at 8:14 AM, Christophe Gijbels notifications@github.com wrote:

@KevinBurton Can you give me the list of Glimpse related NuGet Packages installed in the project where you are adding your service reference?

Just check the packages.config file

My first idea is that the custom tool generating the client classes when adding the service reference, is not talking the web.config into account, where the binding redirects are being configured. Most likely it is loading all assemblies in the project's bin folder into memory and applying some reflection upon it, hence a specific Glimpse assembly, one depending on Glimpse.Core 1.8.2, is loaded, but since the bin folder most likely contains a newer version of the Glimpse.Core and there are no binding redirects defined for that custom tool process the tool crashes

I'm not sure if that can be solved directly, and somehow I guess other assemblies added by means of NuGet packages might have the same problem, but to be sure we first need the information above to try to reproduce it, just to make that is actually the problem


Reply to this email directly or view it on GitHub.

@avanderhoorn
Copy link
Member

Are you able to create a sample which reproduces the issue?

@KevinBurton
Copy link
Author

It seems that when I install Glimpse.MVC4 it is when I start seeing the problem. I can install Glimpse Core and Glimpse ASP.NET and the project doesn't have a problem but as soon as I install Glimpse MVC4 I start seeing the error.
I have a project in my Dropbox account - https://www.dropbox.com/s/hb3prz7p7p0u3zp/OaisysDemo.zip?dl=0
The state of the project is Glimpse MVC4 has not be installed yet. This project has two web references. If these require access that you don't have remove them and try to add another reference that you know will work. I suspect that after Glimpse MVC4 has been install the import of the service reference (VS 2013) will fail.

@avanderhoorn
Copy link
Member

For this sample, is it possible that you start with a new project and add
in components until you find the combination that breaks, or from the
project you have remove everything that doesn't have to do with the problem
until you find the issue?

On 26 March 2015 at 11:23, KevinBurton notifications@github.com wrote:

It seems that when I install Glimpse.MVC4 it is when I start seeing the
problem. I can install Glimpse Core and Glimpse ASP.NET and the project
doesn't have a problem but as soon as I install Glimpse MVC4 I start seeing
the error.
I have a project in my Dropbox account -
https://www.dropbox.com/s/hb3prz7p7p0u3zp/OaisysDemo.zip?dl=0
The state of the project is Glimpse MVC4 has not be installed yet. This
project has two web references. If these require access that you don't have
remove them and try to add another reference that you know will work. I
suspect that after Glimpse MVC4 has been install the import of the service
reference (VS 2013) will fail.


Reply to this email directly or view it on GitHub
#892 (comment).

@KevinBurton
Copy link
Author

The combination that breaks is I add Glimpse Core and Glimpse ASP.NET and the step that breaks is installing Glimpse MVC4. As can be seen from the tree in the attached screenshots MVC4 depends on 1.8.6 so I am not sure where the dependency on 1.8.2 is coming from. Once I remove Glimpse MVC4 it works again. So Glimpse MVC4 seems to me the problem.

glimpse1
glimpse2
glimpse3

@CGijbels
Copy link
Collaborator

@KevinBurton before you install Glimpse.Mvc4 do you see a Glimpse 1.8.2 being mentioned in the dependency graph?

Can you check with the Glimpse.Elmah assembly as well? (I saw that package in your first list of packages)

Either way, I can build your solution you made available on Dropbox, and I was able to add a reference to another service and compile without any problem.

  • So I downloaded the zip
  • opened solution in VS2013
  • compiled => no issue
  • added another service => no issue
  • compiled again => no issue
  • removed added service
  • installed package Glimpse.Mvc4 => no issue
  • compiled => no issue
  • added another service => no issue
  • compiled => no issue
  • added even Glimpse.Elmah => no issue
  • compiled => no issue

so I have no idea where to go further

can you enable logging of assembly bindings? so that you can see the load failure with the fuslogvw.exe that might give you an idea about the application directory from where the custom tool is started and where it starts looking for the Glimpse assembly...

@KevinBurton
Copy link
Author

It is definitely Glimpse MVC4. When I add it an try to update the service reference I get the error and warnings. Once it is removed I no longer get the error. I am not entirely familiar with fuslogvw. But, invoking it in an administrator window yields no information. It is blank both before and after.

@CGijbels
Copy link
Collaborator

@KevinBurton it is quite possible that the Glimpse.Mvc4 might trigger the issue, but the question remains whether it is the root cause, which for me is still not clear.

Regarding the fuslogvw.exe, you must enable it first before bindings are being traced

image

It's possible you might have to reboot VS2013 if it remains empty, but you should be able to see something...

Either way, can you describe a good reproducible case, as in:

  • create new empty web project
  • add the following packages....
  • add service reference pointing to a wsdl (can you try for instance with this free online webservice: http://www.service-repository.com/service/overview/517838238 so if you have issues with that one as well, then we can take your services out of the equation)
  • add glimpse.mvc4
  • BROKEN?....

@KevinBurton
Copy link
Author

Still broken. I just started a new MVC project, added Elmah, Glimpse.Core, and Glimpse.ASP.NET. I ran the project and it showed the default ASP.NET page. Then I added Glimpse.MVC4 again I tried the application and it seemed to work. When I tried to add a service reference (with fuslogvw running as administrator and the settings set as you suggested) I get the error that I have illustrated earlier. Nothing showed up in fuslogvw. If I click on "settings" and close it out it seems to have the same effect as refresh. The UI seems questionable. I don't see an attempt to load Glimpse 1.8.2. I do see a failure for almost all the other Glimpse and Elmah assemblies. This is what I see:
glimpse4

@CGijbels
Copy link
Collaborator

@KevinBurton do you have the same issue with the example soap service I provided? Otherwise we need your wsdl to try to reproduce it...

are these all bind failures shown in the printscreen? Or just all binds? Either way, you should be able to delete them all and then run the add service reference, then at least the new entries should be related to running the custom tool, if that is the issue

@KevinBurton
Copy link
Author

The problem is that these "error" seem to occur in a batch. They occur at the same time or near the same time and they occur all when i try to add a service reference. These are the new entries.

I have included the WSDL for the service that I am trying to add if it matters since I cannot "attach" the file to this message (https://www.dropbox.com/s/iudzg7fcgw474mw/Session.wsdl?dl=0):

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:import namespace="http://microsoft.com/wsdl/types/" />
      <s:element name="Login">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="loginClass" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="LoginResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="LoginResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Logout">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="sessionID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="LogoutResponse">
        <s:complexType />
      </s:element>
      <s:element name="KeepAlive">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="sessionID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="KeepAliveResponse">
        <s:complexType />
      </s:element>
      <s:element name="NoOp">
        <s:complexType />
      </s:element>
      <s:element name="NoOpResponse">
        <s:complexType />
      </s:element>
      <s:element name="GetUserProfile">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="sessionID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetUserProfileResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetUserProfileResult" type="tns:UserProfile" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="UserProfile">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="UserGuid" nillable="true" type="s1:guid" />
          <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="DnisDidNumber" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="AgentID" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Extensions" type="tns:ArrayOfString" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="ArrayOfString">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
        </s:sequence>
      </s:complexType>
    </s:schema>
    <s:schema elementFormDefault="qualified" targetNamespace="http://microsoft.com/wsdl/types/">
      <s:simpleType name="guid">
        <s:restriction base="s:string">
          <s:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" />
        </s:restriction>
      </s:simpleType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="LoginSoapIn">
    <wsdl:part name="parameters" element="tns:Login" />
  </wsdl:message>
  <wsdl:message name="LoginSoapOut">
    <wsdl:part name="parameters" element="tns:LoginResponse" />
  </wsdl:message>
  <wsdl:message name="LogoutSoapIn">
    <wsdl:part name="parameters" element="tns:Logout" />
  </wsdl:message>
  <wsdl:message name="LogoutSoapOut">
    <wsdl:part name="parameters" element="tns:LogoutResponse" />
  </wsdl:message>
  <wsdl:message name="KeepAliveSoapIn">
    <wsdl:part name="parameters" element="tns:KeepAlive" />
  </wsdl:message>
  <wsdl:message name="KeepAliveSoapOut">
    <wsdl:part name="parameters" element="tns:KeepAliveResponse" />
  </wsdl:message>
  <wsdl:message name="NoOpSoapIn">
    <wsdl:part name="parameters" element="tns:NoOp" />
  </wsdl:message>
  <wsdl:message name="NoOpSoapOut">
    <wsdl:part name="parameters" element="tns:NoOpResponse" />
  </wsdl:message>
  <wsdl:message name="GetUserProfileSoapIn">
    <wsdl:part name="parameters" element="tns:GetUserProfile" />
  </wsdl:message>
  <wsdl:message name="GetUserProfileSoapOut">
    <wsdl:part name="parameters" element="tns:GetUserProfileResponse" />
  </wsdl:message>
  <wsdl:portType name="SessionSoap">
    <wsdl:operation name="Login">
      <wsdl:input message="tns:LoginSoapIn" />
      <wsdl:output message="tns:LoginSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Logout">
      <wsdl:input message="tns:LogoutSoapIn" />
      <wsdl:output message="tns:LogoutSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="KeepAlive">
      <wsdl:input message="tns:KeepAliveSoapIn" />
      <wsdl:output message="tns:KeepAliveSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="NoOp">
      <wsdl:input message="tns:NoOpSoapIn" />
      <wsdl:output message="tns:NoOpSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetUserProfile">
      <wsdl:input message="tns:GetUserProfileSoapIn" />
      <wsdl:output message="tns:GetUserProfileSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SessionSoap" type="tns:SessionSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Login">
      <soap:operation soapAction="http://tempuri.org/Login" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Logout">
      <soap:operation soapAction="http://tempuri.org/Logout" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="KeepAlive">
      <soap:operation soapAction="http://tempuri.org/KeepAlive" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="NoOp">
      <soap:operation soapAction="http://tempuri.org/NoOp" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetUserProfile">
      <soap:operation soapAction="http://tempuri.org/GetUserProfile" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="SessionSoap12" type="tns:SessionSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Login">
      <soap12:operation soapAction="http://tempuri.org/Login" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Logout">
      <soap12:operation soapAction="http://tempuri.org/Logout" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="KeepAlive">
      <soap12:operation soapAction="http://tempuri.org/KeepAlive" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="NoOp">
      <soap12:operation soapAction="http://tempuri.org/NoOp" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetUserProfile">
      <soap12:operation soapAction="http://tempuri.org/GetUserProfile" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Session">
    <wsdl:port name="SessionSoap" binding="tns:SessionSoap">
      <soap:address location="http://kplxvop003vp.alpha.kaplaninc.com/TracerWebServices/Session.asmx" />
    </wsdl:port>
    <wsdl:port name="SessionSoap12" binding="tns:SessionSoap12">
      <soap12:address location="http://kplxvop003vp.alpha.kaplaninc.com/TracerWebServices/Session.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

@CGijbels
Copy link
Collaborator

Ah ok, makes sense

could you send us the details for instance of the log entry for the Glimpse.Core 1.8.6 ? Just doubleclick it to get the details, you should be able to see the working directory there as well.

It is strange though that we see a fail entry for Glimpse.Core 1.8.6 and not for the 1.8.2
Regarding the 1.8.2, I think it is the Glimpse.Elmah assemlby that is linked to that one, so do you see a Glimpse.Elmah log entry in there somewhere?

Either way, do you have the same issue with the other service I pointed you to? It is just that I can still not reproduce the issue, which makes it kinda hard to figure it all out 😉

@KevinBurton
Copy link
Author

Forgive me but I am not sure how to check the log entry for Glimpse.Core 1.8.6. I am not sure where to double click on to get the log.

I don't try to install the Glimpse.Elmah package so I don't think it is the culprit. It is only when I try to install the Glimpse.MVC4 package that I start seeing the errors.

I don't seem to have access to http://www.service-repository.com/service/overview/517838238 as when I try to add a service reference to this service I get an error:
glimpse5

@CGijbels
Copy link
Collaborator

@KevinBurton the service url can be found at the link I mentioned, the link itself is not the service. If you go to that page then you'll find the following link: http://www.predic8.com:8080/shop/ShopService?wsdl which you should try to use...

I know you don't try to install the Glimpse.Elmah package, but is it already installed?
If so, do you have the same problem if you first uninstall that package and then add the Glimpse.Mvc4 package?

In the fuslogvw overview, you can just double-click on a specific entry or click on a log entry en choose View Log in the right menubar

Either way, the Glimpse.Elmah check (if applicable) might already give a better idea on the situation

@KevinBurton
Copy link
Author

Thank you. I do not install and it is not already installed (Glimpse.Elmah).
I tried adding the service that you indicated rather than the one that I was trying and I no longer get the error about Glimpse 1.8.2 after I add Glimpse.MVC4. So what do you think this means? After installing Glimpse.MVC4 I can install and update the service that you specified but the service that I need to install will not install or update after Glimpse.MVC4 is installed. The error I get is detailed earlier as there is some reference to Glimpse 1.8.2. I cannot imagine that the service I install has a reference to Glimpse 1.8.2 as it is a service reference. It shouldn't matter but it does. One works and another doesn't. Ideas?

@avanderhoorn
Copy link
Member

Is this still an issue for you?

@KevinBurton
Copy link
Author

I have not been able to solve it yet.

From: Anthony van der Hoorn [mailto:notifications@github.com]
Sent: Thursday, April 23, 2015 6:20 PM
To: Glimpse/Glimpse
Cc: KevinBurton
Subject: Re: [Glimpse] Install Glimpse now I cannot add service references? (#892)

Is this still an issue for you?


Reply to this email directly or view it on GitHub #892 (comment) . https://github.com/notifications/beacon/AChWbmirMlqYjd3uYRkX_hzCqTV9crU2ks5oCXWxgaJpZM4D1KlZ.gif

@RakotVT
Copy link

RakotVT commented Dec 25, 2015

I have same issue, when I try to create/update WCF service client.
Installed Glimpse packages:
package id="Glimpse" version="1.8.6" targetFramework="net45"
package id="Glimpse.AspNet" version="1.9.2" targetFramework="net45"
package id="Glimpse.Mvc5" version="1.5.3" targetFramework="net45"

2015-12-25 22-07-19 foodmvc - microsoft visual studio administrator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants