"Destination configuration already initialized" hatası birden fazla kez RfcDestinationManager.RegisterDestinationConfiguration(..) çağrımı yapıldığı zaman oluşmakta; önceden bağlantı bilgileri tanımı yapılmışsa ve tekrar tanımlama yapılmak istendiğinde oluşmaktadır. Bunu engellemek için rfc bağlantısını önce
RfcDestinationManager.TryGetDestination(..)
ile alırız, eğer dönen değer yok ise
RfcDestinationManager.RegisterDestinationConfiguration(..)
çağrımı yapılarak bağlantı bilgileri tanımlanmalıdır.
Örnek çözüm:
...
RfcDestination prd = RfcDestinationManager.TryGetDestination(ConfigurationManager.AppSettings["DestinationName"]);
if (prd == null)
{
RfcDestinationManager.RegisterDestinationConfiguration(new DestinationConfiguration());
prd = RfcDestinationManager.GetDestination(ConfigurationManager.AppSettings["DestinationName"]);
}
...
veya
başka çözüm olarak asp.net web uygulamasında global.asax dosyasında Application_Start metodunda rfc bağlantı tanımının bir kere yapılmasıdır.
Kaynaklar:
http://codery.blogspot.com/2011/06/avoiding-destination-configuration.html
http://scn.sap.com/thread/3344526
http://www.forosdelweb.com/f29/como-evitar-que-salga-este-error-1043134/
http://scn.sap.com/thread/1885178
C#, .NET, .Net Core
ASP.NET MVC, ASP.NET Web Forms, ASP.NET Core
HTML 5, CSS 3, Javascript, jQuery, Bootstrap
Entity Framework, NHibernate, Dapper
Sql Server, MySql, Oracle
Windows Server, Ubuntu, Debian, Pardus
Xamarin Forms, Android Studio
--- The future of the open web platform is looking very bright!
--- .NET is a free, cross-platform, open source developer platform for building any app.
Google Analytics İzleme
24 Haziran 2013
23 Haziran 2013
SAP .Net Connector - Connector hata sınıfları
The Connector provides several Exception classes that we will implement using a try…catch statement. The exception classes are:
RfcCommunicationException
We couldn’t obtain a connection with the system.
RfcLogonException
We couldn’t logon.
// user could not logon...
RfcAbapRuntimeException
A runtime error has occurred
// serious problem on ABAP system side...
RfcAbapBaseException
A General Abap error has occurred.
// The function module returned an ABAP exception, an ABAP message
// or an ABAP class-based exception...
RfcInvalidStateException
Açıklamasını bulamadım.
Kaynak:
http://klanguedoc.hubpages.com/hub/How-To-Use-SAP-Nco-3-Net-4-Visual-Studio-2010
RfcCommunicationException
We couldn’t obtain a connection with the system.
RfcLogonException
We couldn’t logon.
// user could not logon...
RfcAbapRuntimeException
A runtime error has occurred
// serious problem on ABAP system side...
RfcAbapBaseException
A General Abap error has occurred.
// The function module returned an ABAP exception, an ABAP message
// or an ABAP class-based exception...
RfcInvalidStateException
Açıklamasını bulamadım.
Kaynak:
http://klanguedoc.hubpages.com/hub/How-To-Use-SAP-Nco-3-Net-4-Visual-Studio-2010
SAP .Net Connector - Bağlantıyı kapatma
.Net tarafından SAP'ye yapılan RFC bağlantılarının kapanmasını sağlamak için ilgili bağlantı sınıfları Garbage Collector'dan kaldırılmalı veya RfcDestinationManager.UnregisterDestinationConfiguration(objConnectionConfig); komutu kaldırma işlemi yapılmalıdır.
...
Try running the garbage collector on the object to release unused object.
GC.Collect();
GC.WaitForPendingFinalizers();
...
...
To register a destination use: RfcDestinationManager.RegisterDestinationConfiguration(objConnectionConfig);
//where objConnectionConfig is the implementation of interface IDestinationConfiguration
I also faced this issue finally use Unregister destination like this.
RfcDestinationManager.UnregisterDestinationConfiguration(objConnectionConfig);
Hope this helps.
...
Kaynak:
http://scn.sap.com/thread/1908186
...
Try running the garbage collector on the object to release unused object.
GC.Collect();
GC.WaitForPendingFinalizers();
...
...
To register a destination use: RfcDestinationManager.RegisterDestinationConfiguration(objConnectionConfig);
//where objConnectionConfig is the implementation of interface IDestinationConfiguration
I also faced this issue finally use Unregister destination like this.
RfcDestinationManager.UnregisterDestinationConfiguration(objConnectionConfig);
Hope this helps.
...
Kaynak:
http://scn.sap.com/thread/1908186
SAP .Net Connector - Aktif bağlantıları SAP'de görüntüleme
SAP'ye bağlanan aktif RFC bağlantılarını görüntülemek için SM04 işlem kodu ile gelen ekran kullanılmaktadır. O an aktif olan kullanıcılar görüntülenir.
With this transaction you can kill user.
As i ending their session. http or r/3.
In case you want to see the sessions, users active currently you can use transaction SM04.
It displays terminal , Transaction code being used by user. You can terminate any user session (provided you have rights) from this transaction.
SM04 shows the list of the users which are logged on to the instance in which you are currently logged in (That islocal instance). The total number of users and sessions are given at the bottom of the list.
There are 8 columns in it
...
http://saptransactioncodes.blogspot.com/2009/02/sm04_04.html
RFC Connections remain in SM04
http://wiki.sdn.sap.com/wiki/display/ABAPConn/RFC+Connections+remain+in+SM04
Kaynak:
http://marknsap.blogspot.com/2010/07/sm04-user-list_05.html
http://www.newtosap.info/2012/03/transaction-of-day-sm04.html
With this transaction you can kill user.
As i ending their session. http or r/3.
In case you want to see the sessions, users active currently you can use transaction SM04.
It displays terminal , Transaction code being used by user. You can terminate any user session (provided you have rights) from this transaction.
SM04 shows the list of the users which are logged on to the instance in which you are currently logged in (That islocal instance). The total number of users and sessions are given at the bottom of the list.
There are 8 columns in it
...
http://saptransactioncodes.blogspot.com/2009/02/sm04_04.html
RFC Connections remain in SM04
http://wiki.sdn.sap.com/wiki/display/ABAPConn/RFC+Connections+remain+in+SM04
Kaynak:
http://marknsap.blogspot.com/2010/07/sm04-user-list_05.html
http://www.newtosap.info/2012/03/transaction-of-day-sm04.html
19 Haziran 2013
Javascript - JSON'da dönüş boş ise artık null veya {} dönüşü yapmak gerekli
As of jQuery 1.9, an empty response is also rejected; the server should return a response of null or {} instead.
Kaynak:
http://api.jquery.com/jQuery.ajax/
04 Haziran 2013
SAP .Net Connector - NCo hakkında
This note defines the release of the "SAP connector for Microsoft .NET" (NCo), its support strategy, and its supported platforms.
Other terms
Life cycle, platform, support.
Reason and Prerequisites
The components of NCo can be downloaded from http://service.sap.com/connectors.
SolutionSupport Strategy
- 1. NCo version 1.0 is no longer supported.
- 2. NCo version 2.0 is available for download. Support will be provided in the respective maintenance period of SAP Web Application Server 6.40 and SAP NetWeaver 2004. This shall mean that support is offered for the design time no longer than 31 December, 2009 and for the run time no longer than 31 March, 2013.
There is the installation option of a complete design time and run time comprising version.
- 3. NCo 3.0 is available for download on the SAP .NET Connector homepage:
http://service.sap.com/connectors --> SAP Connector for Microsoft .NET
The maintenance period for NCo 3. 0 currently extends until July 31st, 2018.
- 1. The design time version of NCo version 2.0 requires:
- Windows 2000, Windows XP, or Windows Server 2003
- Microsoft Visual Studio .NET 2003, including Microsoft .NET Framework 1.1
- Sun Java Runtime Environment (JRE) version 1.3 or 1.4
- 2. The runtime version of NCo version 2.0 requires:
- Windows 2000, Windows XP, or Windows Server 2003
- Microsoft .NET Framework 1.1
- 3. NCo 3.0 no longer consists of a design time and a runtime, but instead comprises one single runtime component. Hence, there is no longer a dependency to a specific Microsoft Visual Studio version.
It no longer uses the "proxy approach", but a "dynamic approach" similar to JCo and the NW RFC library. This makes it easier to develop applications using different versions of Microsoft Visual Studio. Currently, NCo 3.0 supports the following platforms:
- Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows 7
- 32bit (x86) as well as 64bit (x64) platforms
- Microsoft .NET Framework 2.0, 3.0, 3.5 and 4.0 (Choose the version for .NET 4.0, when using the .NET runtime 4.0, and the version for .NET 2.0, when using the .NET runtimes 2.0, 3.0, or 3.5.)
NCo 3. 0 works with any SAP backend system starting with release 4.0B, and transparently supports Unicode and non-Unicode backends. Note that there is no longer any dependency to librfc32.dll.
Kaynak:
http://www.stechno.net/sap-notes.html?view=sapnote&id=856863
Kaydol:
Kayıtlar (Atom)