Error in CLR: InvalidOperationException - The current type is an interface and cannot be constructed. Are you missing a type mapping?
Hi, I'm trying to execute a .NET assembly's method from SQL Server 2012 Express, but I'm stuck with this error calling the sp:
Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type ISymmetricCryptoProvider, key "TripleDESCryptoServiceProvider" ---> Microsoft.Practices.Unity.ResolutionFailedException:
Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider", name = "TripleDESCryptoServiceProvider".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider, is an interface and cannot be constructed. Are you missing a type mapping?
At the time of the exception, the container was:
Resolving Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider,TripleDESCryptoServiceProvider
---> System.InvalidOperationException: The current type, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider, is an interface and cannot be constructed. Are you missing a type mapping?
System.InvalidOperationException:
en Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)
en BuildUp_Microsoft.Practices.EnterpriseLibrary.Security
Microsoft.Practices.ServiceLocation.ActivationException:
en Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
en Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key)
en Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.GetSymmetricCryptoProvider(String symmetricInstance)
en Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, String ciphertextBase64)
en ...
Is there any limitation by design for Interface instantiation from CLR database?
Any help I will appreciate, thanks a million!!
Bob, thanks for your response.. Yes, the code works fine outside of SQLCLR. This is the class I'm trying to instantiate, I'm using it to envolve Cryptographer, an Enterprise Library 5.0 class actually, so I have no control to test it without referring the
interface.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
using System.Security.Cryptography;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
namespace Cars.UtileriasGlobales.Helpers
/// <summary>
/// Clase que permite encriptar y desencriptar cadenas de textos utilizando
/// TripleDESCryptoServiceProvider de Enterprise Library 5.0
/// </summary>
public static class Cryptography
#region Metodos
[SqlProcedure]
public static void DesencriptarSQLServer(SqlString cadena, out SqlString cadenaDesencriptada)
cadenaDesencriptada = !String.IsNullOrEmpty(cadena.ToString()) ? Cryptographer.DecryptSymmetric("TripleDESCryptoServiceProvider", cadena.ToString().Replace(" ", "+"))
: String.Empty;
#endregion
I have collected all the dependent assemblies in one directory 'C:\migrate', so the create assembly finish ok. This is the script to create the assembly I'm using:
sp_configure 'clr enable', 1
GO
RECONFIGURE
GO
ALTER DATABASE cars SET TRUSTWORTHY ON
GO
CREATE ASSEMBLY CryptographyEntLib5
AUTHORIZATION dbo
FROM 'C:\migrate\Cars.UtileriasGlobales.dll'
WITH PERMISSION_SET = UNSAFE
GO
CREATE PROCEDURE usp_Desencriptar
@cadena nvarchar(200),
@cadenaDesencriptada nvarchar(MAX) OUTPUT
AS EXTERNAL NAME CryptographyEntLib5.[Cars.UtileriasGlobales.Helpers.Cryptography].DesencriptarSQLServer
GO
DECLARE @msg nvarchar(MAX)
EXEC usp_Desencriptar 'Kittu And Tannu',@msg output
PRINT @msg
Similar Messages
-
Hey,
I'want to make connection from my laptop(xxx.xxx.xxx.xxx = A) to a fixed computer(SQL server xxx.xxx.xxx.xxx =B). My connection string = "Provider=SQLNCLI11; Data source:name-pc/SQLEXPRESS; Integrated circuit=SSPI;Intial Catalog=Database name for visual
studio C#.
Laptop -> PC1 : Eror
It works when i use localhost or 127.0.0.1 and i can read my database without any problems if i install SQL server on my laptop. Know i install it to PC1 and uninstall on my laptop. When i change the name-pc by an ip-adress i get this error: Login failed.
The login is from untrusted domain and cannot be used with windows authentification. I did some research on multiple forums where they say about Local security policy(secpol.exe) but i don't have this file.
PC2-> PC3: work fine but i want to work with my laptop and i don't understand why it isn't working with my Laptop.
Can someone help me?
Thx a lot and sry about my english(its a disaster)
ThibautHello,
Yes, for the Windows Authentication to work you should be using the same Windows account and password.
Are you willing to create SQL logins inside SQL Server and allow your users to connect to SQL Server using SQL Authentication
instead of Windows Authentication? That could be a solution on a workgroup network.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
The error 600 occurred in the current database connection "LCA".
Hi All,
User is executing job /SAPAPO/TS_REALIGN_COPY in background, as soon as the job is released its failing with runtime error:
I check the Note 1126394 but not relevant.
Runtime Errors DBIF_DSQL2_SQL_ERROR
Exception CX_SY_NATIVE_SQL_ERROR
Date and Time 18.08.2011 00:03:39
Short text
An SQL error occurred when executing Native SQL.
What happened?
The error 600 occurred in the current database connection "LCA".
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
How to correct the error
Database error text........: "POS(1) Work rolled back: BAD_ALLOCATION in
SAPTS_COPY_DA"
Database error code........: 600
Triggering SQL statement...: "EXECUTE PROCEDURE SAPTS_COPY_DATA"
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_DSQL2_SQL_ERROR" "CX_SY_NATIVE_SQL_ERROR"
"/SAPAPO/SAPLOM_TIMESERIES" or "/SAPAPO/LOM_TIMESERIESU20"
"/SAPAPO/OM_TS_DATA_COPY"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
Information on where terminated
Termination occurred in the ABAP program "/SAPAPO/SAPLOM_TIMESERIES" - in
"/SAPAPO/OM_TS_DATA_COPY".
The main program was "/SAPAPO/TS_RLG_COPY_SINGLE ".
In the source code you have the termination point in line 57
of the (Include) program "/SAPAPO/LOM_TIMESERIESU20".
The program "/SAPAPO/SAPLOM_TIMESERIES" was started as a background job.
Job Name....... "/SAPAPO/TS_REALIGN_COPY"
Job Initiator.. "CIBERNLAPO2"
Job Number..... 00015100
The termination is caused because exception "CX_SY_NATIVE_SQL_ERROR" occurred
in
procedure "/SAPAPO/OM_TS_DATA_COPY" "(FUNCTION)", but it was neither handled
locally nor declared
in the RAISING clause of its signature.
The procedure is in program "/SAPAPO/SAPLOM_TIMESERIES "; its source code
begins in line
1 of the (Include program "/SAPAPO/LOM_TIMESERIESU20 ".
Kindly suggest any notes or is any setting needs to be modified.
Regards,
KaasiHello Ada,
the job was aborted due:
Database error text........: "POS(1) Work rolled back: BAD_ALLOCATION in
SAPTS_COPY_DA"
Database error code........: 600
Triggering SQL statement...: "EXECUTE PROCEDURE SAPTS_COPY_DATA"
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
From the posted dump.
Was it lack of OMS heap memory, memory leaking, program error or huge data selection for application run it's not clear. It will be best for SAP customer to create the SAP message and get SAP support when application canceled due Database error BAD_ALLOCATION in LCA routine.
Regards, Natalia Khlopina -
The error "-10401" occurred in the current database connection "LCA"
Hi everyone,
I installed livecache 7.7 with scm7.0,when i did postinstallation Initialization or run t-code lca03,i got error dump as below.now the livecache states is good.in scm server I not installed package Lcapps.please help give your advise,thank you so much.
untime Errors DBIF_DSQL2_SQL_ERROR
xception CX_SY_NATIVE_SQL_ERROR
ate and Time 01/20/2010 03:26:32
Short text
An SQL error occurred when executing Native SQL.
What happened?
The error "-10401" occurred in the current database connection "LCA".
How to correct the error
Database error text........: "Conversion of parameter/column (1) would tru
data"
Database error code........: "-10401"
Triggering SQL statement...: "EXECUTE PROCEDURE "APS_PLAN_VERSION_GET""
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:Hi Natalia,
thanks for you much help,the livecache version is 7.7.02,so I will try to upgrade to 7.7.04,thank you.
Server Utilities d:/sapdb/programs 7.7.02.08 64 bit valid
DB Analyzer d:/sapdb/programs 7.7.02.08 64 bit valid
PCR 7301 d:/sapdb/programs 7.3.01.21 valid
PCR 7500 d:/sapdb/programs 7.5.00.42 64 bit valid
SAP Utilities d:/sapdb/programs 7.7.02.08 64 bit valid
APO LC APPS d:/sapdb/k1p/db/sap 6.00.004 64 bit valid
Base d:/sapdb/programs 7.7.02.08 64 bit valid
Redist Python d:/sapdb/programs 7.7.02.08 64 bit valid
JDBC d:/sapdb/programs 7.6.03.02 valid
Messages d:/sapdb/programs MSG 0.5010 valid
ODBC d:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 77 d:/sapdb/programs 7.7.02.08 64 bit valid
Database Kernel d:/sapdb/k1p/db 7.7.02.08 64 bit valid
Loader d:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC d:/sapdb/programs 7.7.02.08 64 bit valid
Fastload API d:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 76 d:/sapdb/programs 7.6.01.15 64 bit valid -
The error "-10709" occurred in the current database connection "LEA"
Hi,
I've Updated forecast and I have the followoing error message,
(/SAPAPO/MMSDP)
Database error text........: "Connection failed (RTE:protocol error)"
Database error code........: "-10709"
Triggering SQL statement...: "EXECUTE PROCEDURE LCK_DEQUEUE_OWNER"
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
the error "-10709" occurred in the current database connection "LEA"
just after it was ok .
I knwo LEA is the lock table to the liveache, is there parametes tied to the lock (like R/3 enque/table...?)
Does someone have an idea of this issue (which happened regulary for the first time this morning, we're SCM 5.0)
Best Regards,
JohnJohn,
It looks like a support pack issue.
Check this post, maybe it will help:
the error "-10401" occurred in the current database connection "LCA"
Let me know if this was helpful.
Abhi -
Error "-602" occurred in the current database connection "R/3*".
Hi All,
I am working with Preview 2004s ABAP Trial version ,when load data from PSA to Info cube with help of DTP , getting following error.
Runtime Errors DBIF_DSQL2_SQL_ERROR
Except. CX_SY_NATIVE_SQL_ERROR
Date and Time 20.07.2008 16:04:52
Short text
An SQL error occurred when executing Native SQL.
What happened?
The error "-602" occurred in the current database connection "R/3*".
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
How to correct the error
Database error text........: "POS(1) System error: BD Index not accessible"
Database error code........: "-602"
Triggering SQL statement...: "INSERT INTO "/BIC/SZD_PROD" ( "/BIC/ZD_PROD",
"SID", "CHCKFL", "DATAFL", "INCFL" ) VALUES ( ? , ? , ? , ? , ? )"
Internal call code.........: "DBDS/NEW DSQL"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
please help me in this
Kind regards.
HariHi All,
Problem resloved.
hari -
Error "-7500" occurred in the current database connection "LCA"
LC & apo box rebooted due hardware failure now once LC is up then all cif quuese are failing with "An SQL error occurred when executing Native SQL" error. Looking further it indicates lc issue.
Getting multiple dumps in apo box with :-
Short text
An SQL error occurred when executing Native SQL.
What happened?
The error "-7500" occurred in the current database connection "LCA".
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
How to correct the error
Database error text........: "POS(1) DCOM HRESULT:APS_COM_VERSION_GET,00000002"
Database error code........: "-7500"
Triggering SQL statement...: "EXECUTE PROCEDURE "APS_COM_VERSION_GET""
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
Steps already taken :-
1) LC apps start/stop
2) Index recovery done from DBMGUI
Any suggestion on this ? Only expert comments please.>
> Steps already taken :-
> 1) LC apps start/stop
did you restart liveCache from LC10 -> administration-> ...?
-any errors in lcinit.log ? (/sapdb/data/wrk/)
-any errors in knldiag or knldiag.err
-I would suggest to open SAP message and let them to login and check it
Regards
Ivan -
Hi All,
I'm getting the below error in My SHarepoint 2013 search Administration page.
Crawler background activity - The search application 'Search Service Application 1' on server "" is not provisioned. Confirm that the Microsoft SharePoint Foundation Timer service and Central Administration service are running
on the server.
and when i click on Crawl Log and content source
it throws the below error
The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether
the service is enabled. This might also be because an indexer move is in progress
When i check the search status
Get-SPEnterpriseSearchServiceInstance, it shows all the components are online.
As of now search service application is online and search is working.But not sure why it throws the above error.
I have restarted timer service,search service in services.msc and cleared the sharepoint cache as well.
But no luck,This is happening in my prodcution environment.
Any help will be greatly appreciated.
There are the logs i have found
05/23/2014 13:03:22.71 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3%2Dc3e4%2D4097%2D85fd%2Daa5248346d2e) d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.71 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Authentication Authorization agb9s Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=, ClaimsCount=0 d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.73 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.79 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djs2 High [Forced due to logging gap, cached @ 05/23/2014 13:03:22.76, Original Level: VerboseEx] {0} d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.79 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Database 8acb High [Forced due to logging gap, Original Level: VerboseEx] Reverting to process identity d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.80 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djj1 High Unable to find application 'b9c8106c-c7ed-4eb3-96c9-ae1881ffb695' d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djj1 High Unable to find application 'b9c8106c-c7ed-4eb3-96c9-ae1881ffb695' d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General 8nca Medium Application error when access /_admin/search/listcontentsources.aspx, Error=The search service is currently offline. Visit the Services
on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress. at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object
sender, EventArgs e) at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Runtime tkau Unexpected Microsoft.SharePoint.SPException: The search service is currently offline. Visit the Services on Server page in SharePoint Central
Administration to verify whether the service is enabled. This might also be because an indexer move is in progress. at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object sender, EventArgs e)
at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General ajlz0 High Getting Error Message for Exception Microsoft.SharePoint.SPException: The search service is currently offline. Visit the Services on
Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress. at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object
sender, EventArgs e) at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General aat87 Monitorable d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation DistributedCache ah24q Unexpected SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts are present in the farm. d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation DistributedCache ah24w Unexpected Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedViewStateCache'
- Exception 'System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts present in the farm. at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'. d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General ajb4s Monitorable ViewStateLog: Failed to write to the velocity cache:
http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3-c3e4-4097-85fd-aa5248346d2e d4c6939c-b10d-4000-6d95-14caeefe67df
05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3%2Dc3e4%2D4097%2D85fd%2Daa5248346d2e)).
Execution Time=109.695855199474 d4c6939c-b10d-4000-6d95-14caeefe67df
Anil LokaPlease try below mentioned steps:
1. Central Administration > Monitoring > Review job definitions > Look for following timer job "Application Server Administration Service Timer Job" > Disable
2. Then open windows administrative services (services.msc), stop SharePoint Timer Service
3. Clear SharePoint Timer configuration cache by following steps mentioned in below blog:
http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx
4. Start SharePoint Timer Service and give it a few seconds so that the new XML files from the location you deleted then are re-populated.
5.Central Administration > Monitoring > Review job definitions > Look for following timer job "Application Server Administration Service" Timer Job > Enable
Please ensure that you mark a question as Answered once you receive a satisfactory response. -
please help on below error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'IBM' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 27: using System.Web.Services;
Line 28: using System.Net;
Line 29: using IBM.WMQ;
Line 30: using System.DirectoryServices.AccountManagement;
Source File: c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\NBO\LogComplaint.aspx.cs
Line: 29Hello,
>>using IBM.WMQ
It seems you are using third party dll namespace reference in your project but that dll is not being added in project. Please get the IBM.WMQ dll and add it first in your current visual studio project by right click on project-->add reference.
You can place this dll in GAC or can directly add to project as suggested by jaydeep.
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
we are using VS 2013. i have created new build definition and run that created build its getting failed and showing error message as "The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly
reference?)" and "The type or namespace name 'WinComboBox, UITestControl, WinTitleBar.....etc' could not be found (are you missing a using directive or an assembly reference?)". in the error log is showing the error number are "error CS0234
& error CS0246".
Actually i have created build for automation execution from MTM lab environment. i have to assign the build to the test plan. once the build is passed , i will assign to the test plan and run with automation options.
if i build the solution its getting successfully build. but when i run the created build definition it show the error message's.
Could you guide me how to resolve the above error's ?
Thanks in Advance...Hello Divakar Ponnada,
I have checked the error CS0234 from here:
http://msdn.microsoft.com/en-us/library/0e92xd7b.aspx
It means your project cannot find the proper reference to your type "Visual Studio" from the namespace Microsoft.
May I ask this question, does your build definition means something like the following blog described?
http://www.asp.net/web-forms/overview/deployment/configuring-team-foundation-server-for-web-deployment/creating-a-build-definition-that-supports-deployment
"A build definition is the mechanism that controls how and when builds occur for team projects in TFS. "
If that is the problem, may I ask whether your build agent is in the same machine where you build your application?
The build agent will first search for the reference from its local GAC and if it cannot find it, the error like you said will reports. Please manually build your project from your build agent machine to see the result, or install Visual Studio to your build
agent machine. In that way I think your problem may fixed.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello experts,
I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
string tempFileName = fileName;
int count = 1;
while (allFiles.Contains(tempFileName ))
tempFileName = String.Format("{0} ({1})", fileName, count++);
output = Path.Combine(folderPath, tempFileName );
string fullPath=output + ".xml";
However, it gives the following compilation errors
for the Select and Contain methods respectively.:
'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
(are you missing a using directive or an assembly reference?)
'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
found (are you missing a using directive or an assembly reference?)
I googled on these errors, and people suggested to add using System.Linq;
I did, but the errors persist.
Any help and information is greatly appreciated.
P. S. Here are the using clauses I have:
using System;
using System.Data;
using System.Windows.Forms;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Linq;Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace consAppFileManipulation
class Program
static void Main(string[] args)
string fullPath = @"c:\temp\trace.log";
string folderPath = @"c:\temp\";
string fileName = "trace.log";
string output = "";
string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
string extension = Path.GetExtension(fullPath);
string path = Path.GetDirectoryName(fullPath);
string newFullPath = fullPath;
string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
string tempFileName = fileName;
int count = 1;
//THIS IS AN INFINITE LOOP
while (allFiles.Contains(fileNameOnly))
tempFileName = String.Format("{0} ({1})", fileName, count++);
//THIS CODE IS NEVER REACHED
output = Path.Combine(folderPath, tempFileName);
fullPath = output + ".xml";
//string fullPath = output + ".xml";
UML, then code -
I am creating a Winforms application. I need to upload and download a file from Sharepoint.
I have added reference to Microsoft.Sharepoint.Client.
Below is the code to upload file:
using System.IO;
using Microsoft.SharePoint;
private void Button_Click_1(object sender, RoutedEventArgs e)
String fileToUpload = @"C:\Test.txt";
String sharePointSite = "https://myshapoint";
String documentLibraryName = "Test";
using (SPSite oSite = new SPSite(sharePointSite))
using (SPWeb oWeb = oSite.OpenWeb())
if (!System.IO.File.Exists(fileToUpload))
throw new FileNotFoundException("File not found.", fileToUpload);
SPFolder myLibrary = oWeb.Folders[documentLibraryName];
// Prepare to upload
Boolean replaceExistingFiles = true;
String fileName = System.IO.Path.GetFileName(fileToUpload);
FileStream fileStream = File.OpenRead(fileToUpload);
// Upload document
SPFile spfile = myLibrary.Files.Add(fileName, fileStream, replaceExistingFiles);
// Commit
myLibrary.Update();
But i get the error "The type or namespace name 'SPSite' could not be found (are you missing a using directive or an assembly reference?)"
I am not sure what else I am supposed to do here.Hi,
If you want to develop a WinForm application to be only used in SharePoint Server, we can use Server-Side Object Model(use Microsoft.Sharepoint.dll) to achieve it.
If you want to use the WinForm application to be used both in Server side and Client Side, I suggest you use .Net Client Object Model(use Microsoft.Sharepoint.Client.dll) to achieve it.
Here are two links for your reference:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/c357e3c7-37e9-4ded-83aa-a57beae0b0e4/how-to-upload-download-files-to-sharepoint-2013?forum=sharepointdevelopment
http://msdn.microsoft.com/en-us/library/ff798388.aspx
Best Regards
Dennis Guo
TechNet Community Support -
Trying to get sql server compact up and running. I connected to a sqlite database and atuo generated the model.cs code.
however, I get the following error.
Error 1 The type or namespace name 'SQLite' could not be found (are you missing a using directive or an assembly reference?) C:\Users\kenny\Documents\Visual Studio 2013\Projects\WindowsFormsApplication2\WindowsFormsApplication1\Model.cs
3
Any help is greatly appreciated. Please provide some detail as I am novice.
ThanksOk so I got the past that problem. I had to add the package System.Data.SQLite Core in Manage NuGet.
Then I changed the auto-generated code "using SQLite" to "using System.Data.SQLite".
But now I have a new problem, it says "System.Data.SQLite.SQLiteConnection' does not contain a definition for 'CreateTable' "
Here is the code
//This code was generated by a tool.
//Changes to this file will be lost if the code is regenerated.
//using SQLite;
using System;
using System.Data.SQLite;
using System.Data.SQLite.EF6;
namespace WindowsFormsApplication2
public class SQLiteDb
string _path;
public SQLiteDb(string path)
_path = path;
public void Create()
using (SQLiteConnection db = new SQLiteConnection(_path))
db.CreateTable<servers>();
public partial class servers
public Int64 server_name { get; set; }
public Double cpu_usage { get; set; }
Any ideas why CreateTable is not available? -
I am trying to compile my SharePoint 2010 solution(VS2010) in VS2013 to deploy in SP2013, i have removed all old 14 ref and added 15 ref for microsoft.SharePoint, office.server and other assemblies.
still i am getting "The type or namespace name 'BusinessData' does not exist in the namespace 'Microsoft.SharePoint'
(are you missing an assembly reference?)"
did i miss any step here or any version issue?
any suggestions to resolve
Thanks
S.Venkata AppajiHi,
Just confirm that Target Frame work has been changed to 4.5 or not, if not changed it to 4.5 and give it a try. Then also it gives error then check the SP reference, dll properties and check its version(it should be 15.0.).
PS:-You can fine target framework under project properties->Application-> Target Framework.
Regards,
MS -
I just bought a macbook pro and want to use my own iCloud account for my iPhone. How do I sign off of the current account on my iPhone and sign in with my own iCloud account i set up my mac?
On your phone, Go to "Settings", "iCloud", scroll to the bottom and "sign out." Assuming you have the the account password/security info of the current account, it will delete everything iCloud related upon your approval (don't worry, everything will remain in the cloud.) Once signed out, in the same settings location (under "Settings", "iCloud") sign in using your Apple ID and Password.
Hope this helps.
Maybe you are looking for
-
Analysis Authorization Issue 7.3
Hello Friends, System BW 7.3, Currently there are 80 odd analysis authorization objects We want to introduce a new info object (GL Account) to be authorization relevant, ( there are few objects in the system which are already authorization relevant i
-
Late 2007 MacBook Pro S-Video adapter no output.
I've troubleshooted everything I can, so hopefully one of you can help me! My Fiancé's mom has a late 2007 MacBook Pro running Mountain Lion. She has an older tv, so I was wanting to mirror the display so she can watch Netflix on her TV. After diggin
-
Why must I continually disconnect and reconnect my airport express in order to get it to play my ITunes library on my TV?
-
is it possible to play video out of Final Cut on a 24" iMac to a plasma monitor. I could buy a Macpro and get 2 video cards to drive 2 Cinema Displays and a 3rd black magic card to drive a plasma, we do that at work but that is a lot of money. I coul
-
Cannot download latest update...help?
I can download the update but as soon as I hit "run" a dialogue box appears that says "Instalshield" in the top left corner and then has a bunch of command line perameters with an "ok" button at the button...I hit ok and nothing happens...help?