Dot net fortify Scanning - asp.net

Can I run fortify scan on my machine without Visual Studio Installation?
I mean by fulfilling the basic requirements. Currently when scanning the code via fortify there are errors like cannot locate ildasm.exe
MSBuild: [error]: Unable to locate the Microsoft .NET disassembler tool (ildasm). Please make sure you have Visual Studio .NET version 7.1 or greater installed along with the SDK.
MSBuild: If ildasm is installed in a non-standard location, please provide the full path to ildasm in the fortify-sca.properties file as com.fortify.sca.IldasmPath.

Yes, you can. You will need the Windows .Net SDK or a copy of the files from a development box. These files are typically located at C:\Program Files(x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools or similar. I've set up automation on machines that do not have Visual Studio installed and I just copy these files to a suitable location.
Next, you need to alter [FortifyInstallRoot]\Core\config\fortify-sca.properties and add com.fortify.sca.IldasmPath=[Path to the SDK files] using forward slashes (/) and NOT back slashes (\).
Finally, you will need to add some registry keys so that Fortify knows where to look for .Net Framework assemblies:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1]
"CLR Version"="v2.0.50727"
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 7.1\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0]
"CLR Version"="v2.0.50727"
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 8\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0]
"CLR Version"="v2.0.50727"
"InstallDir"="c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0]
"InstallDir"="c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\"
"CLR Version"="v4.0.30319"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0]
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\"
"CLR Version"="v4.0.30319"

If you want to exercise GUI option, you can use Audit workbench.
Open the project that you want to scan, it will show up all files that you want to include in scan.

Related

How to build a project in qt 5.2.1 for amd64 (setup cl.exe and missing mspdb110.dll file)?

I have installed qt 5.2.1 and Visual Studio 2012 in Windows 7 x64 (I have codepage 1251 if it matters). I use vs11 compiler.
Firstly I tried to run 'Rebuild all' action and I have received an error connected with cl.exe.
Then I added the path to vs11/bin to PATH variable (where cl.exe file is located; strange but it is in Program Files x86 folder) and have received the error: mspdb110.dll is missing. What should I do next? How to build the project?
Add to PATH path of directory with this dll. It's in something like C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64. If you have not such file in entire system, I guess you should reinstall Visual Studio.

QT with Visual Studio 2013 Express

I'm trying to get QT to work with Visual Studio Express 2013.
As first I downloaded sources, and was trying to compile it using Developer Command Prompt for VS2013. Gave up, after adding to QT source files new things, to keep compiler move on.
After that I just installed QT binaries. The QT: "qt-windows-opensource-5.1.1-msvc2012-x86_64-offline.exe"
It has it's own editor, but I would like to use QT inside Visual Studio Express 2013. Can I just link libraries, from Visual Studio Express 2013 project?
I linked C:\Qt\2010.05\qt\include to the Include, C:\Qt\2010.05\qt\lib to the libraries and C:\Qt\2010.05\qt\bin.
But there are a lot os subdirectories, that Visual doesn't include.
Should I wait for QT Sources compatible with Visual Studio Express 2013?
Or can I use it now, like that?
Regards
To do this from cmd.exe you have to edit your PATH by adding QtDir/bin there, then cd to your project directory and write the line written before.
Everything should looks like this:
Run cmd.exe
cd your_project_dir/
qmake -spec win23-msvc2010 -tp vc
After this manipulations you will have .vcproject file in your project directory

How to install EFPowerTool Beta on the right version of VS on my PC

I have several versions of MS Visual Studio installed on my PC. VS 2010, VS Express 2012 for Web and WebMatrix 2. The problem I am having is that when I try to install EFPowerTool Beta (Entity Framework Power Tool)(vsix file) on VS Express 2012 for Web to use in my ASP.NET MVC project; the MS Visual Studio version selector selects VS 2010 and installs it on that IDE. Do you have any solution on how to install EFPowertool on VS Express 2012 for Web? I'm clueless?
According to vsixmanifest files you need at least Pro versions of VS2010 or VS2012 to install the EF Power Tools Beta. You can try to hack it (No guarantees - I have not tried):
1) Add .zip extension to the vsix file. (vsix is actually a zip file)
2) Unpack the zip file to a folder
3) Open vsixmanifest file
4) Modify the file so that this fragment:
<VisualStudio Version="11.0">
<Edition>Pro</Edition>
</VisualStudio>
looks as follows:
<VisualStudio Version="11.0">
<Edition>Express_All</Edition>
<Edition>Pro</Edition>
</VisualStudio>
5) Zip the folder back
6) Rename zip to vsix
7) Double click the vsix file to install
Again, this is a hack. Even if it allows you to install the extension on the Visua Express for Web it does not mean everything (or anything) will work. But still - it takes only 10 minutes to try.

Microsoft Visual Studio 10.0 Can not Load mso.dll for designer view

I am doing an ASP project and I am having the following problem when trying to switch from code to designer view .A pop up appears and visual studio shuts down.
cannot load "c:\PROGRA~2\MICROS~2.0\Common7\packages\vwd\mso.dll
here are some solution from the Internet that I tried and did not work out
1. I reinstalled the software ( visual studio 10.0 )
2. Some suggest to user less privileged account, so I also tried that . Did not work .
3.I have Microsoft Office Installed and its working just fine
3. I read some vague thing about a certain patch ( but could not find it )
4. The mso.dll file is NOT missing or deleted .
Here is my installation folder for my visual studio 10.0
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
HELP ! ? !
I know this post from long ago but if someone still have an issue:
Update PATH environment variables with below proper path:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd.
To solve the problem, I tried many solutions available on the web. The one that really worked for me was:
First, I used the utility "Depency Walker". I opened the "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll" file with this utility and it found missing Msvcr90.dll file dependency.
Then download the Microsoft Visual C ++ 2008 Service Pack 1 Redistributable Package MFC Security Update and run it.
The problem was solved.

Using Visual Studio 2008 Web Deployment projects - getting an error finding aspnet_merge.exe

I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building:
The specified task executable location "bin\aspnet_merge.exe" is invalid.
Here is the source of the error (from the web deployment targets file):
<Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true'" DependsOnTargets="$(MergeDependsOn)">
<AspNetMerge
ExePath="$(FrameworkSDKDir)bin"
ApplicationPath="$(TempBuildDir)"
KeyFile="$(_FullKeyFile)"
DelaySign="$(DelaySign)"
Prefix="$(AssemblyPrefixName)"
SingleAssemblyName="$(SingleAssemblyName)"
Debug="$(DebugSymbols)"
Nologo="$(NoLogo)"
ContentAssemblyName="$(ContentAssemblyName)"
ErrorStack="$(ErrorStack)"
RemoveCompiledFiles="$(DeleteAppCodeCompiledFiles)"
CopyAttributes="$(CopyAssemblyAttributes)"
AssemblyInfo="$(AssemblyInfoDll)"
MergeXmlDocs="$(MergeXmlDocs)"
ErrorLogFile="$(MergeErrorLogFile)"
/>
What is the solution to this problem?
Note - I also created a web deployment project from scratch in VS2008 and got the same error.
Apparently aspnet_merge.exe (and all the other SDK tools) are NOT packaged in Visual Studio 2008. Visual Studio 2005 packaged these tools as part of its installation.
The place to get this is an installation of the Windows 2008 SDK (latest download).
Windows 7/Windows 2008 R2 SDK: here
The solution is to install the Windows SDK and make sure you set FrameworkSDKDir as an environment variable before starting the IDE. Batch command to set this variable:
SET FrameworkSDKDir="C:\Program Files\Microsoft SDKs\Windows\v6.1"
NOTE: You will need to modify to point to where you installed the SDK if not in the default location.
Now VS2008 will know where to find aspnet_merge.exe.
I just ran into this same problem trying to use MSBuild to build my web application on a server. I downloaded the "web" version of the SDK because the setup is only 500KB and it prompts you for which components to install and only downloads and installs the ones you choose. I unchecked everything except for ".NET Development Tools". It then downloaded and installed about 250MB worth of stuff, including aspnet_merge.exe and sgen.exe
You can download the winsdk_web.exe setup for Win 7 and .NET 3.5 SP1 here.

Resources