Unable to connect to QC server - c#

I am a .NET developer using C#. I am trying to connect to QC Version 11 server (64bit) but it's throwing an exception (Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))) when I call .InitConnectionEx method. I have installed QC client 11 on my development machine. My development machine is also 64 bit (Windows 7/2008). It looks like some QC dll is not getting registered during client installation on the local machine. I have written the below C# code for connection but I am receiving the issue on line 2.
TDConnection tdConnect = new TDConnection();
tdConnect.InitConnectionEx("http://192.168.1.10:8181/qcbin/");
tdConnect.ConnectProjectEx("DEFAULT", "Test", "admin", "admin");
Please help me to find out solution on priority.

Are you running your application with elevated privileges? It could be the application is not able to access the appropriate underlying COM object the .NET wrapper is trying to access...

Try installing the QC Connectivity Add in, I believe it registers all the components correctly and fixed this error for me.
11.52 and possibly other versions: from within QC Explorer > Help > ALM Tools > HP ALM Connectivity
QC 11: https://almpc.sqa.its.state.nc.us/qcbin/TDConnectivity_index.html
*If the quality center server was patched, you may have to login to QC and then copy all of the files from your appdata/local\HP\ALM-Client\alm folder into C:\ProgramData\HP\ALM-Client\alm

Related

sqlserverspatial110.dll vs sqlspatial130.dll

I am trying to move a deployment to a new Azure VM with SQL Server 2016. I am receiving the following error when trying to run the mvc app locally on the server.
Unable to load DLL 'SqlServerSpatial110.dll': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)
The fix for me was to manually copy sqlserver110.dll to the c:\windows\system32 folder on the new server. I feel this is a step backwards, and I should really be trying to redirect the call to the sqlserver130.dll that installed on the new server by default with SS 2016. I tried updating EF 5 to the latest version, but this did not seem to fix the issue. Any suggestions?

Deployment failed with HRESULT:0x80073CF9/Deployment Add operation failed with error 0x80070002

I am trying to deploy my Windows Universal test App built in Visual Studio 2015 RC on a recently upgraded HP Windows 10 tablet.
But app fails to install. The same application is correctly installed on my Windows 10 Laptop.
Complete error :
"Add-AppxPackage : Deployment failed with HRESULT:0x80073CF9, Install
failed. Please contact your software vendor.
Deployment Add operation with target volume C: on Package
2ccd2f92-3e7f-4781-94d4-77de6896ad81_2015.810.607.4634_neutral_~_432wcw9hw150w from:() failed with error 0x80070002. See
http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
deployment issues.
NOTE: For additional information, look for [ActivityId]
45afcb8b-d363-0002-58da-af4563d001 in the Event Log or use the command
line Get-AppxLog -ActivityID 45afcb8b-d363-0002-58da-af4563d001
At C:\myapp\Add-AppDevPackage.ps1:388 char:13
+ Add-AppxPackage -Path $DeveloperPackagePath.FullName -ForceApplicati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\myapp\p....1.0.3_ARM.appbundle:String) [Add-AppxPackage],
IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
Error: Could not install the package."
Tried the fix from https://support.microsoft.com/en-us/kb/910336.
Also checked the reference links in error but no helpful diagnosis for this error code is given.
Earlier I was able to install test apps on Windows 8.1 version using same process. Can it be due to Windows 10 upgrade? Any ideas?
It looks like the problem occurs only when System login is through Microsoft Account.
I removed the MS account and used the local Device Account. It fixed the problem.
Still not aware of the exact root cause. Must be something to do with Account permissions. (Although MS account I used had Admin privileges.)
I was met with the same problem with same error code. But in my case, in the phone earlier the project with the same App name was present, and I was trying to deploy the App of next version with a change in App certificate.
So, uninstalling the previous App from phone, and re-installing the App with certificate worked for me.
Some interesting hint direct from Microsoft Forum: https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_store/help-with-0x80073cf9-on-windows-10/a1bd57d1-4bfe-4f9d-91c2-0a87c596f983
Add-AppxPackage: Deployment failed with HRESULT: 0x80073CF9, Install failed.
Please contact your software vendor. (Exception from HRESULT: 0x80073CF9)
For rectifying this you only need to run PowerShell as admin

Unable to create DataCacheFactory instance in debug

I'm working on web project that will run on Windows Azure Web role;
In the cloud, there will be 2 instances of the role;
I'm using co-located named cache (In-Role Cache) spread between 2 role instances;
Locally, I debug with single instance;
In the cloud, cache client is created successfully and work fluently;
When debug locally, I am unable to create instance of DataCacheFactory, because when the constructor is called, the program flow "stops" and doesn't continue to the following statement. There is no exception!
That's the code where I'm creating Factory and cache client:
var cacheFactoryConfig = new DataCacheFactoryConfiguration
{
ChannelOpenTimeout = TimeSpan.FromMinutes(2),
TransportProperties = {ReceiveTimeout = TimeSpan.FromSeconds(45)}
};
DataCacheFactory cacheFactory;
try
{
cacheFactory = new DataCacheFactory(cacheFactoryConfig);// <--stops here
}
catch (Exception e)
{
Trace.WriteLine(string.Format("--> Message-> {0}; --> Stack Trace->{1}", e.Message, e.StackTrace));
throw;
}
cacheClient = cacheFactory.GetDefaultCache();
Service configuration:
Cache client and server configuration in web.config
I would give any additional information if such is requested in order to resolve the problem shortly.
------EDIT 1------------------
Due to related post Making Windows Azure Caching Work in Compute Emulator I have to add some info:
Operating sistem -> Windows 7 Professional
IDE -> Visual Studio 2013 Ultimate Update 4
Windows Azure Caching package 2.4.0.0
Windows Azure SDK Version 2.4
I don't have Windows Server AppFabric installed, so I'm going for it!
After few days of investigation, I managed to solve the issue and successfully create instance of DataCacheFactory and DataCache and so on. The problem is described and solved in the following 2 posts:
https://social.msdn.microsoft.com/Forums/azure/en-US/8580689a-a1a1-4db7-bba9-f42c1a90e0db/windows-azure-webrole-caching-preview-hangs-makes-the-emulator-stuck-in-deploy-loop?forum=windowsazuredevelopment
http://blog.elastacloud.com/2012/06/09/using-the-windows-azure-cache-preview-with-sdk-1-7/
In my case, I had Microsoft Server AppFabric installed, so I removed it.
Just in case, I removed all available Windows Azure SDKs (2.4 was installed) and
all old nuget packages related to Azure Caching.
I did verify that all assemblies are removed from GAC too.
After "cleaning" I install again latest Azure SDK available which is 2.5. http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-in-role/
I would like to point out, that windows Event Viewer helped a lot. In Windows Azure logs I found an error that was happening when I start the web role with Azure Emulator. Error was thrown by CacheInstaller.exe -> MissingMethodExceprion with message:
Method not found:
'Microsoft.ApplicationServer.Caching.ClusterConfigElement

Using C# to administer IIS

I would like to create an app that will deploy a website. Basically, I just want this app to copy the publish files to the webserver in a new folder, change the website to that folder, then recycle the app pool.
I found out that I should be able to do this with Microsoft.Web.Administration. I am having a problem with even the most basic task as I'm learning how to do this. here is my code in a windows form app to just play with this.
try
{
using (Microsoft.Web.Administration.ServerManager sm = Microsoft.Web.Administration.ServerManager.OpenRemote("webservername"))
{
foreach (var site in sm.Sites)
{
MessageBox.Show(string.Format("{0}", site.Name));
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
I'm simply trying to loop through the websites and display the names as my first try. The error I get is the following:
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FA7660F6-7B3F-4237-A8BF-ED0AD0DCBBD9}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).
at Microsoft.Web.Administration.ConfigurationManager.CreateAdminManager[TClass,TInterface](WebConfigurationMap webConfigMap, Boolean isAdminConfig)
at Microsoft.Web.Administration.ConfigurationManager.CreateWritableAdminManager(WebConfigurationMap webConfigMap, String configPathToEdit, Boolean isAdminConfig)
at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig)
at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(String rawConfigurationPath, String cacheKey, Boolean isAdminConfig)
at Microsoft.Web.Administration.ConfigurationManager.GetApplicationHostConfiguration()
at Microsoft.Web.Administration.ServerManager.GetApplicationHostConfiguration()
at Microsoft.Web.Administration.ServerManager.get_SitesSection()
at Microsoft.Web.Administration.ServerManager.get_Sites()
The line that errored is:
foreach (var site in sm.Sites)
I've tried this with both my local IIS8 express and a windows server 2008 IIS 7.5
What have I done wrong?
You may want to check the following points:
The Name of the server. If not sure try looking for in your IIS Management
The version of the .dll is the right for your version of IIS.
The .net framework version. Since it use System.Web it depends on full-version of the .net framework but not on the Client Profile subset.
The machine on which the code is executing needs to have the IIS Management Scripts and Tools Windows feature installed.
On a Windows client OS or on Windows Server 2008 R2 and earlier, you can install it via the following steps:
Open Control Panel > Programs > Turn Windows features on or off.
Drill down to Internet Information Services > Web Management Tools and check IIS Management Scripts and Tools.
You are trying to manage a remote server, so
The account runs the code must be the local administrator of that remote server.
The DCOM ports must be opened at firewall.

Getting error '80070002' from COM .dll

I am moving a Classic ASP site from a Windows 2000 server to a Windows 2008 (both dev and prod). I have a .dll that was created in .NET 1.1. The error is occurring when function created in JScript located in this securityUtility.asp creates an ActiveXobject using the dll. The line looks as follows:
function getProfileFromLdap(user, pw){
var aClass, aProfile
aClass = new ActiveXObject("com.co.comp.security.ldap.LDAPLogin");
...
}
The error that is occurring is:
error '80070002'
E:\SITES\WWW-COMPANYSITE-COM\SITE\BINS../../siteInc/securityUtility.asp, line 850
I had run the following command to register the dll in the registry:
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" coSecurity.dll /tlb:coSecurity.tlb
I don't know if it's worth mentioning but at one point the site worked perfectly in dev and erring when I attempted to move the site to production. I had moved the site to the new dev server (Windows 2008) so long ago. I had made notes so when I moved it up to production I knew what steps I had taken. I thought perhaps I forgot to record a step so in attempt to retrace what I did, I uninstalled the .dll and went through the steps I had recorded. It is now broken in dev but at one point it was working.
Another thing I'm not sure is worth mentioning is this site was the first site on the new dev server. .NET 1.1 was installed prior to any other framework. 4.0 and 2.0 were installed after the fact. On the prod server 4.0 was installed first and then 1.1. Not sure if that's signficant or not.
When the dev site was working I had confirmed the items were in the
registry comparing them to the old production and the new dev
servers and the new production
On the old production server there was nothing in the GAC
The coSecurity.dll is in the same file as the securityUtility.asp
(the page that the code belongs to).
The Application pool for the has "enable 32-bit applications" as true
for both of the new environments
"Everyone" is granted full rights on the .dll
I'm not sure what I'm missing!
This is what I ended up doing for those that have been beating their heads against the wall like I was:
opened a command prompt as administrator
navigated to where the dll was stored
unregistered the dll using
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" /u
coSecurity.dll
re-registered the dll by using
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" coSecurity.dll
/codebase
you'll get a regasm warning but should also get the message "Types
registered successfully"
After that I no longer recieved the error!
In general HRESULT 80070002 means "File Not Found".
My guess is you are missing a dependency. Try using Dependency Walker to see if there are any dependencies which should be included.
Also see this thread for some tips about registering COM servers manually.

Categories

Resources