How to make Glimpse work with production and TeamCity - glimpse

I have installed Glimpse in my MVC5 EF6 AspNet-solution and have created a custom runtime policy with GlimpseSecurityPolicy.cs.
Everything works great when working locally but when I deploy the solution through TeamCity, following error comes up:
[Csc] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig...
[Csc] GlimpseSecurityPolicy.cs(3, 7): error CS0246: The type or namespace name
'Glimpse' could not be found (are you missing a using directive or an assembly reference?)
What can I do to make this work? Manually signing the glimpse DLL-files seems kinda hacky solution and would not like that one.

Related

OpenIdConnectOptions Missing from .net core sample application on linux

I am trying to follow this tutorial for Azure AD authentication in a .NET core web app:
https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/aspnetcore2-2
and I get this error:
The type or namespace name 'OpenIdConnectOptions' could not be found (are you missing a using directive or an assembly reference?)
I am using Linux and have no issue getting the basic templates to generate and build, the issue appears to arise where the tutorial says to add this line:
services.Configure<OpenIdConnectOptions>(AzureADDefaults.OpenIdScheme, options =>
{
options.Authority = options.Authority + "/v2.0/";
options.TokenValidationParameters.ValidateIssuer = false;
});
I have tried adding packages (semi randomly) e.g.:
Microsoft.IdentityModel.Protocols.OpenIdConnect
Microsoft.Owin.Security.OpenIdConnect
to no avail as the error persists and I get new issues like:
Error: Package 'Microsoft.Owin 4.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.
I am not sure if I am missing some basics with authentication and running .net core on linux, I am new to this and just trying to get the ball rolling with a working demo that actually does something :)
I have not checked on linux yet, but the nuget package you are missing should be produced by ASP.NET Core from the following project: https://github.com/aspnet/AADIntegration. Did you try to update the latest nuget package of ASP.NET Core ?
As a workaround you might want to have a look at the following branch of the sample (which still has the code which was now moved to ASP.NET Core AADIntegration) : https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master
ran into the same issue. After installing these modules, it compiled.

System.TypeLoadException on Azure App Service

I'm running an asp.net 4.6 app on the app service. Just removed mvc from the site and using url rewrite to run an mvc free angular spa with a webapi.
Now it's asking for a type that was renamed months ago and works in pre mvc removal builds. I don't think it's got something to do with mvc though.
In trying to solve this I've xeroxed my local bin folder onto the server and the error still persists. So some sort of server config?
Has anyone ever experienced this before?
The error means that you are using a type which is not found in your assembly. To troubleshoot this issue, you need to find where you used this type. I suggest you use the Find in files feature provided by Visual Studio by pressing Ctrl+Shift+F. After found the place which used the type, you just need to delete it and rebuild your application.

IAppBuilder could not be found

I read the previous posts - Tried a few things.
Here is the issue
A simple console OWIN self host app - Not much in there
public void Configuration(IAppBuilder appBuilder)
does not compile.
1. If I say using Microsoft.Owin and using Owin, then I get an error the using directive for owin already appeared. I can't figure out why.
2. If I do using Microsoft.Owin but modify the use as Owin.IAppBuilder
then the compiler says it can't find owin.IAppBuilder.
Yes I tried reinstalling Microsoft.Owin
and Owin (3 times)
I checked the project reference 4.5.1
Here is an issue to consider.
If your using statements are insider a namespace declaration
And your name space starts with Microsoft (for whatever reasons)
Then using Owin ==> looks at Microsoft.Owin
The solution is to use using global::Owin;

DotNetNuke module development errors after upgrading to VS 2012

I have been working on building a DNN module in VS 2010 under DNN 7.0.3. My module has a few controls, a web service, and some jQuery/Ajax calls to the web service. I am working in Windows 7 with IIS 7. Everything was fine until I upgraded to VS 2012. After that, I was getting 500 errors for all the files I am loading into my control, i.e. javascript files, css files, and even images (never saw a 500 error on an image before!). I tried rolling back my project to before I loaded it into VS 2012, but that didn't help. I found this article: Setting up separate ASP.NET app with DotNetNuke
and implemented the suggestion in answer 2 (adding location... to the web config file). That fixed most of the problems, but I am still getting 500 errors for 2 HttpHandlers I built (which just spit out some javascript) and for any calls to my web service. The error I am getting now is:
Parser Error. An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
It kind of looks like it can't find the codebehind for these files. That makes some sense, since that was basically the problem it was having with all the files before I added the tag to the web.config.
I tried a clean install of DNN 7.0.6 and just installed my module from the package that was created earlier, but still the same errors. Since I haven't made any change to my code since it was last working, I am pretty sure the problem has something to do with changes the VS 2012 install made to my machine but I have no idea what. Please help!!!
Thank you :-)
Check to see if you have a VIRTUAL DIRECTORY or Application on the DesktopModules folder, or on the Module's folder in there, sometimes that happens in VS.
Also make sure there is NOT a web.config file in the MODULE folder.

Plugin registration tool throwing Unable to load plug-in assembly

I'm using the latest version of the MS CRM 2011 SDK and am trying to deploy a custom workflow activity (it has been signed with a key). The plugin registration tool throws an error "Unable to load plug-in assembly" without much information about the root cause.
The error trace thrown by the tool is very similar to the one described in this post
The answer to the post referenced above indicates adding Microsoft.Xrm.Client assembly in the GAC, but my workflow project references the following DLLs
1)Microsoft.Crm.Sdk.Proxy.dll
2)Microsoft.Xrm.Sdk.dll
3)Microsoft.Xrm.Client.dll
4)Microsoft.Xrm.Sdk.Workflow.dll
Should all these be added to the GAC?
The CRM server is Win 2K8R2. I tried dragging and dropping the assemblies to the c:\windows\assembly folder but that did not work. No errors but nothing was copied over either. I followed the instructions outlined in this post but that did not work either.
What am I missing?
I don't think you should have to place any crm dlls into the gac, they are already installed in the CRM server files. If you think it might solve the problem use gacutil (not clear if you can't install to the gac, or if that didn't fix the problem).
I suspect its complaining about your dll, are you trying to register to the disk? As you usually have to place the dll in the crm/server/bin folder first. Try deploying to the database - makes life easier for deploying the solution to other servers later.
If that still doesn't work post the trace of the error.
Turn on crm server side.tracing. You'll get much better error information. Use the CRM diagnostic tool to turn on trace logging: http://crmdiagtool2011.codeplex.com
Turns out that if you use the /codecustomization switch to have the code generator derive from "CrmOrganizationcContext", you need "microsoft.xrm.client.dll". This DLL is not included in the default install of CRM and you need to get this on the server one wa or another.
I decided against using the /codecustomization switch which causes the "context" to derive from "OrganizationContext" instead and not take a dependency on that DLL. Plugin registration now works! This post provides more insight

Resources