Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all 3509 articles
Browse latest View live

Problem with Claims Principal properties in Visual Studio 2017

$
0
0

I have a project that uses the ClaimsPrincipal to get the CurrentUser.Identity.Name.  When I run the same piece of code in Visual Studio 2017 the name field is blank.

This is not a .NET Core project but just a regular .NET library.   The problem appears only happens in unit test applications and there is no problem when the code executes under IIS for example. 

Did something change in the .NET System library that visual studio 2017 uses?  I can replicate 100% of the time. If I create a 2015 project the code works perfectly as expected.  In 2017 the code returns empty string.  Again, this is only for Test projects but still needed.

The object Im referring to is:  ClaimsPrincipal.Current.  And the property is ClaimsPrincipal.Current.Identity.Name.

I found an article indicating that the ClaimsPrincipal changed for .NET core but I did not think it would would matter for regular .NET libraries.

Any suggestions to preserve the same outcome in 2017 as 2015 ?

Thanks, 


What should I do if my SQL database shows suspect mode error message?

$
0
0

Yesterday, I had received error message:  

Could not redo log record %S_LSN, for transaction ID %S_XID, on page %S_PGID, database '%.*ls' (database ID %d). Page: LSN = %S_LSN, type = %ld. Log: OpCode = %ld, context %ld, PrevPageLSN: %S_LSN. Restore from a backup of the database, or repair the database.

I did some research and find some useful references:

https://www.sqlskills.com/blogs/paul/creating-detaching-re-attaching-and-fixing-a-suspect-database/

https://www.stellarinfo.com/sql-recovery.php

Please guide me how to proceed further!

No Data tools are shown..

$
0
0

When try to add data models to an project like ado entity data model. No Data Option to choose the model.

Bundler & Minifier Expected expression, found ''

$
0
0

I am trying to minify thru Mads Kristensen's tools that I have been using for ages but this CSS file (see http://216.224.173.168:82/css/style.css ) gives me an error, see print screen below. Any idea ? Strange enough it is pointing to the minified file not the original

Need help with missing project templates

$
0
0

Hi guys! I am still learning so this problem is probably something super basic and I am missing something very obviousbut but I have no idea how to solve it.

So the problem is: I have to start new project using default ASP.NET Web Application Template (Framework 3.5) but all i see is the empty template. If anybody know the reason or have a way to fix that please, tell me. Thanks. 

Visual Studio 2012 open web application build in framework 4.0

$
0
0

hi guys.. since visual studio 2012 is using framework 4.5

can i open my web application which build under framework 4.0 in visual studio 2012?

TQ

An unhandled exception(Script Breakpoint) occured in iexplorer.exe[8396]

$
0
0

Hi,
We are facing the below debugger issue in Microsoft visual studio12 issue while working with IE version 11 and windows7 (64 bit ),When we debug the code using debugger keyword in the JavaScript .

An unhandled exception(Script Breakpoint) occured in iexplorer.exe[8396]

We have also tried the following steps
1.Cleared the local tempfile ,passwords etc. in internet settings as well as in \Local\Temp path
2. Enabled the 2 checkbox (Disable Script debugging in IE and other ) in Advanced option and also Reset the Internet settings  
3.Enabled the  Compatibility mode in System32 for vsjitdebugger.
4.We have restarted the machine also.
But still we are getting the error while running the application in IE. Please suggest us any solution to resolve this issue and also confirm us whether it requires any system admin rights to do further investigation to resolve the debugger  issue. Since at present we don’t have the system admin privileges for the system in which issue occurs.

visual Studio 2015 Enterprise Update 3 will not install

$
0
0

Hi folks;

We've been using VS 2012 for about 4 years now.  Recently however, the enterprise placed a Host Intrusion Protection System onto the machines we use.  This HIPS causes use to get a HIPS error each time we try to install any Visual Studio 2012 updates on any of these machines.  They recently applied for an exception for Visual Studio 2015 so we are able to install Visual Studio 2015 Enterprise version D14REL. 

Seeing the updates which were available for VS 2015 we attempted to install Visual Studio 2015 Update 3.  We first tried it on my old machine where we first had success installing VS 2015 Ent. D14REL.  We were able to do this by going into Add/Remove Programs selecting VS 2015 Ent, selecting "change" and Selecting modify.  Upon doing so we were given the option for selecting Update 3 in the install wizard.  This worked fine and my old machine has VS 2015 Ent Update 3.  Then another user got a download from the Microsoft site for Update 3.  When He tried to install using an install disk created by the downloaded iso, at first his VS2015 was corrupted.  Then he did a repair (again selecting update 3 from the components to be installed list.)  This resulted in him having Update 3 installed.  I tried to use the same disk on my new machine.  However, the machine reported it did not see any disk in the DVD-RW disk drive. So we copied it onto a folder in the C:\ drive .  We ran the installer Wizard.  The wizard went through the acquiring all the necessary files quite rapidly.  The it started doing Visual Studio 2015 preparation.  As soon as this step completed it reported "Set up complete", and went to the end of the set up process.  However, the about dialog on VS 2015 reported it was still at D14 REL.  I tried doing a repair like the other guy.  It just went to "Setup complete" in a short period of time after running "VS 2015 preparations"  I tried doing a repair from Add/Remove Programs.  Same behavior.  I tried logging onto the machine with an administrator user, and running the install "as administrator".  No difference.  There are no HIPS errors, There are no logged errors reported.  It just refuses to install.

It is mandated that I switch to this new machine in as short of time possible, but I can not do so until I can put the current Update of Visual  Studio on the machine because it is a violation to operate any software that doesn't meet the security standards that were implemented in Update 3.

It is not clear to me why this update won't install on this one machine.  Has anyone else seen this kind of behavior? 


Opening Project in VS produces reports IIS Express error.

$
0
0

I have a project that runs on https://localhost:44306 .  Yesterday by my manager's requirement I published the project for deployment to a test machine for the customers (which also is using IIS Express and is running IIS Express from the command.  However, the IIS Express on that machine for some unknown reason is not able to be configured to use SSL.  Therefore before publishing I changed the project properties so as to run usinghttp://localhost:51716 , and changed SSL Enabled to false.  (I've since discovered that this was not necessary as the web app would run under whatever bindings were entered in applicationHost.config for that web app no matter what it read when it was published.)

However, once the deployment was complete I switched the project back to SSL Enable = true and to run usignhttps://localhost:44306 .  I had to go into the applicationHost.config to put the SSL binding back into the Web site description.  However now whenever I open the project in VS 2012 I get an error message saying:

An error occured when applying the IIS Express settings
to server URL 'https://localhost:44306' for project 'projectName'.
You may have to manually edit the applicationHost.config file
and make changes for your site to run correctly.

Since I've already done that then I am not sure what possible error IIS Express could be experiencing.  There is nothing in the IIS Express log files to indicate that an error even occurred.  Nor is there anything in the Event Viewer logs to show ANY error.  I cannot find any Visual Studio 2012 error logs. 

While one may be attempted to recommend that this thread be posted on the IIS.Net forums, I've found over the past year that the contributors to  that forum are unconversant with IIS Express and do not bother answer queries about it.

So to quote Star Wars;  "Help me Obi-wan Kenobi; you're my only hope."

Changing default set up of new Asp.net visual Studio 2012 Project

$
0
0

In VS 2012 the standard new Web Forms project and MVC project automatically include the DotNetOpenAuth assemblies.  We do not use Openauth.  We cannot use openauth.  In just makes for an number of additional files that are included in the project which then makes deployment exceedingly difficult, and slow over a slow network where each file being deployed has to be documented.  However, each time I try to remove them from a project to which they have been added, it makes for a long involved struggle to get to the point at which the project can be compile and published again because of all the errors that get thrown when these files and references are removed.

I would like to know how to change the default set up of a new web forms or MVC project so that it would not include these extraneous assemblies.

Thank everyone in advance for your assistance.

Visual Studio Update 4 Broke IIS Express' ability to request Client Certificates.

$
0
0

I had my IIS Express configured as specified on this page http://jasonrshaver.com/?tag=/Client+Certificates .  This allowed me to run my application in SSL for the 11 months from June 2013 all the way up to 9:50 AM EST this morning April 22, 2014.  At 9:54 AM EST we ran Visual Studio 2012 Update 4.  At 11:00 AM EST I opened my web application and ran a debug.  At no point did IE or IIS Express request a client Certificate.  The application runs an authentication process which evaluates the server variables and headers to get the Subject value from the client certificate.  But there was no Client certificate, so there was no Cert_Subject server variable, so the application failed before it could even get to the part I was coding.   I checked

All of the settings in both applicationhost.config files are as directed on the web site.  This was not happening before VS 2012 Update 4 was run.  This started happening immediately after VS 2012 Update 4 was installed.  So there is a one to one correlation between these symptoms and the VS 2012 Update 4.  What did Update 4 do to my IIS Express.

.net Projects running under Different version in same solution

$
0
0

Hi Team

we have legacy projects which were running under .net3.5 version framework.

Created another solution and added web api project(Running under 4.6.1 .net framework+mvc5) which will access legacy project dlls or libraries (running under .net 3.5).

I have added 9 dll references(running under .net 3.5) to web api project(Running under 4.6.1 .net framework
+mvc).

While building and rebuilding web api project, it got succeeded in both the cases.

While building entire solution, it got succeeded.

While rebuilding the entire  solution it is giving errors, one dll not building properly out of 9 dlls.  Every time getting different number of errors related to that project dll.

In .CS files it is not showing any error realted to dll.

But in error list it is showing below error(one sample error message)


Severity


Code


Description


Project


File


Line


Suppression State


Error


CS0234


The type or namespace name 'Entities' does not exist in the namespace 'AdminTools.Common' (are you missing an assembly reference?)


GenericToolsMvcWeb


C:\dev\AdminTools\AdminTools\Src\GenericToolsWebApi\Source\UdwBaseWebServiceWrapper.cs


6


N/A

Visual Studio Editor Window Space Rapidly

$
0
0

Is it possible to get the maximum space for editor’s window without giving up the VS window ? 

VS 2017 Community- need to upgrade workload for C++

$
0
0

I installed community 2017 lat year; when I installed I didnt check the C++ Workload . Now I want to use it for C++, the tutorial i am watching is prompting that the Windows Desktop Wizard is the template to use for a specific project, but i don't see it in my template lineup, though I do see on the left side Visual C++, with subtemplates ATL, General, Test,and Win32. How would i update my vs2017 to include the Windows Desktop template?
tia , Ned

Visual Studios not Creating ASPNETDB.MDF

$
0
0

I'm running Windows 7,  IIS 8.0 Express, Visual Studios 2010

I have the same problem Visual Studios not creating ASPNETDB.MDF . I have follow the troubleshooting instructions on (

http://go.microsoft.com/fwlink/?LinkId=160102) But they don't work. Visual studio still not creating ASPNETDB.MDF file. The App_Data Folder its already created. Does anybody know how to fix it?


Are Express versions of VS still available for free download?

$
0
0

Tried to look for Express versions of VS but couldn't find downloads. The last one I found was VS2015. Is MS still offering that option?

Visual Studio 2015 -- trying to get Typescript 2.7.2 package to be used! Where are the VC++ Directories?

$
0
0

Hello,

  • I am using Visual Studio 2015 for an MVC project, decided to upgrade my Bootstrap from 3.0 to 4.0 ... which brought in Popper, which is requiring Typescript 2.2+ due to some new type references in the index.d.ts file.
  • I don't have administrative privilege on this server so I cannot install the newer version of Typescript (currently has 1.8 installed) onto the system.  
  • But there is Microsoft.Typescript.Compiler v2.7.2 was available as a NuGet package, so I installed it, and can see the new typescript compiler executable ... but it's not being picked up.
  • I then looked around online to find out how I get the compiler to be used, and the suggestion was to add an executable directory path in the "VC++ Directories" panel.
  • However this panel has been deprecated from the Visual Studio IDE, and the vague references to find the "user properties" file have proven futile.
  • Maybe I am missing something simple, but I have not been able to find enough info to get me through this.

Bottom line -- I would like to get Bootstrap 4.0 working for my VS project, and get past these type definition errors in the index.d.ts file which are indicative of needing the newer version of Typescript.

Please help!

Thanks.  John

Visual Studio Community 2017, Can't see local variables values

$
0
0

Hello everebody,

I install Visual Studio Community 2017 and can't see local variables values on debuging. It show me that in gray. Windows "Locals", "Authos" is empty.

Intellisense show me just a name of variable and nothing deeper.

Tryed to insert breakpoint, nothing happend :(

Tryed to check Tools ->Options -> Debugging -> Use Managed Compatibility Mode , no success :(

Thank you

'IServiceProvider' does not contain a definition for 'GlobalProvider' and no extension method 'GlobalProvider' accepting a first argument of type 'IServiceProvider'

$
0
0

I'm new to C#. Please help me with the following code

using EnvDTE;

DTE dte = (DTE)ServiceProvider.GlobalProvider.GetService(typeof(DTE));
Project project = dte.ActiveDocument.ProjectItem.ContainingProject;

But I get the error 'IServiceProvider' does not contain a definition for 'GlobalProvider' and no extension method 'GlobalProvider' accepting a first argument of type 'IServiceProvider'.

I could not figure out the reason for this error. Please let me know the cause of the error.

Problem whith Crystal Report in the client side

$
0
0

Hi all!
First forgive me for my English.
I am from Greece.

I am developing an application for the company i work!

I have a computer as server.
Server is an 64bit platform with windows 7 ultimate
In the server is installed
1. Microsoft Visual Studio Ultimate 2013 V. 12.0.30122
2. Microsoft SQL Server 2012 V. 11.0.2100.60
3. SAP Crystal Reports, version for Microsoft Visual Studio V.13.0.20.2399
4. SAP Crystal Reports run time engine for .NET Framework (64-bit) V. 13.0.20.2399

I have too a computer as Client.
Client is an 32bit platform with windows 10
In the client is installed
1. SAP Crystal Reports run time engine for .NET Framework (32-bit) V. 13.0.20.2399

I am developing my application in Visual Basic

Inside the Visual Studio environment i have create a Crystal Report for print something.
That, i want to print need a custom paper W121mmXH157mm. So i a have setup my printer
(an HP CP1215 Color Jet) from Windows control panel and the printers properties to
have as paper size the custom size i want!

The first problem i am facing is that when i click the print button in my crystal report viewer
i have to adjust the printer properties to print to custom paper, otherwise the crystal print to
"Letter" paper, and nothing is printed correctly!
Is any idea how to make this not happened? That mean the crystal report to take the paper size i have
setup the printer in the Windows control panel!

Now i was navigated to the folder E:\my documents\Visual Studio 2013\Projects\Grafeio_Kinisis\Grafeio_Kinisis\bin\Debug
(the folder with executable files of my application) and copied all the files.
I am pasted them to the client computer, and i run my application from there.

I forgot to mention that Server and client computers is under the same Domain, in a local network we use
in my company, and that the printer is installed at the client as a network printer (had make it
previously as common in the server side).

The application is running good, but when i was trying to print the crystal report i am facing the problem
that the format of my report is totally a different thing, from what i have designed in the visual studio!
No Font format, No page format , nothing

Have any one any idea why this is happened?

Thanks in advance!

Viewing all 3509 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>