Need help on how to programmatically pass the Binary Security Token from C# code in visual studio 2012

Hi All,
Below is my signed SOAP request. I don't have any web.config configuration for this also no idea on how to implement message level security. Could you please suggest on implementation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v1="http://www.notification/V1.0"
xmlns:v11="http://www./effectivity/V1.0">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:BinarySecurityToken
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="X509-9B329C3CD7BD01ABE81422559607628108">MIIKZTCCCE2gAwIBAgIKXdo6EQACAAXqazANBgkqhkiG9w0BAQUFADB3MRMwEQYKCZImiZPyLGQBGRYDbmV0MRowGAYKCZImiZPyLGQBGRYKYm9tYmFyZGllcjEUMBIGCgmSJomT8ixkARkWBGFlcm8xFDASBgoJkiaJk/IsZAEZFgRhZXJvMRgwFgYDVQQDEw9BZXJvLUlzc3VpbmctQ0EwHhcNMTUwMTIzMTkzMzIyWhcNMTcwMTIyMTkzMzIyWjCBvzELMAkGA1UEBhMCQ0ExDzANBgNVBAgTBlF1ZWJlYzERMA8GA1UEBxMITW9udHJlYWwxGDAWBgNVBAoTD0JvbWJhcmRpZXIgSW5jLjESMBAGA1UECxMJQWVyb3NwYWNlMScwJQYDVQQDEx5jb2xsYWItZGV2LmFlcm8uYm9tYmFyZGllci5uZXQxNTAzBgkqhkiG9w0BCQEWJm10bF9pdF9vcHNfd2luZG93c0BhZXJvLmJvbWJhcmRpZXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzlzvsKg9LVifnEtxq947BXI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PMIguTeGxOD/oINhsufMAIBZAIBDTATBgNVHSUEDDAKBggrBgEFBQcDATAbBgkrBgEEAYI3FQoEDjAMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4ICAQCtFw4FKpzNr8gpnpHHJvgjUfe7FbXvzuf8qENJQA
+5KJjD6rqeSGpDJcvSwiFblZobFswFb7OABrxfpvDnmDbBfvozHPhAWBnmISz0t2ydb7R/SY1cl8NihamCPrtVN/azVDVqvj1kHkrVRM18BGSFowqGixMFQr4rDgB75214FN69a85AnxV5O5ip
+U9g/JdW2qRSGcfUd1np2QActllDimc+33rp/nXIaoXjRlXhkm+WxCt3Ca5OgwnVm3a4Ceiljj
+1i5
+8XV2zngv6eq4HlrBg0sFPaHWdjrIGcNyaWW0h0dPQUuv4Gm3zKDkQ3AQSC3cV5qCqmh6fCaCsI3us2kSJjHMZa
+OSDLI7K01pDP85TieHeoONBo8mRKsOQ0e1FGXH2BkbXSN1DgfJ1IzddaBbSsnjR5gNrRMmZJnCXnluT8Gmwyv9EKjMit6yt0sWwrADd5ZIjYUnxnrkgfXpPY2kqK2gOl12IHjFK6d5vUsGTlIv9H3OmtCWVBHpR125C0CZvU987z3u9Gv4Jiuv/LpDuv1bNuqNHsQfSqSYsjEreGIP
+DapzhMOefiv+kN4nLj3Owk4VdQm9
+dxekwaS7HFwAQGOVik877mXxmjRhwxtZPW0ZrWs3fZ2z90Ppki4cGN/rtaLGz
+WwicrPt1B34296kQkkIolWtiGjkpnQ==</wsse:BinarySecurityToken>
<ds:Signature Id="SIG-9B329C3CD7BD01ABE81422559607628111"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="soapenv v1 v11"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#id-CF533499567BE717AA1422396248543100">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="v1 v11"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>AYy1/Ni9XTOZy4F3AFagcxkLnws=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>B/psgt7s4dcnlAFK9HWPYSPRQi
+B75tj7zv6KCG2IFd3y3kE0k4DjNyK17ZcqhXkUdxcmDoydbnH
4WUq7XmeG05w/VTbwn8g8RIoY48NaCOCQsXl6RztxhzRxbeocwngebUclJPnEPw3Nr0zguvNFuPa
wBkqcYFAgwG2dlwl/B8QVjvu1xjeXlVP5uHfubdpP
+tG0OnCWztG16108ORqtA2Df3Aj/JnXk2jt
RcIx6fPNna
+mv/MtCGOpSO4vDOf66He/UunkKjo/O5OvO9wuRhZOMJcSEkwVHCBAr9qbRGR72snq
C15GRcCpFyZIP7tElyY1WhBppKNi9j+YA0w9cQ==</ds:SignatureValue>
<ds:KeyInfo Id="KI-9B329C3CD7BD01ABE81422559607628109">
<wsse:SecurityTokenReference
wsu:Id="STR-9B329C3CD7BD01ABE81422559607628110">
<wsse:Reference
URI="#X509-9B329C3CD7BD01ABE81422559607628108"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
<soapenv:Body wsu:Id="id-CF533499567BE717AA1422396248543100"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<v1:sendNotificationRequest>
<v1:notificationHeader>
<sourceAppID>PORTAL</sourceAppID>
<creationTimestamp>2015-01-27T23:27:16.932Z</creationTimestamp>
</v1:notificationHeader>
<v1:notificationTarget>
<!--Optional:-->
<userID>?</userID>
<!--Optional:-->
<v1:emailChannel>
<!--Optional:-->
<v1:fromAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:fromAddress>
<!--Zero or more repetitions:-->
<v1:toAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:toAddress>
<!--Zero or more repetitions:-->
<v1:CCAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:CCAddress>
<!--Zero or more repetitions:-->
<v1:BCCAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:BCCAddress>
</v1:emailChannel>
<!--Optional:-->
<v1:SMSChannel>
<message>?</message>
<phoneNumber>?</phoneNumber>
</v1:SMSChannel>
<!--Optional:-->
<v1:portalNotifChannel>
<creationDate>?</creationDate>
<expiryDate>?</expiryDate>
</v1:portalNotifChannel>
</v1:notificationTarget>
<!--Zero or more repetitions:-->
<v1:company>
<companyId>?</companyId>
<!--Optional:-->
<sourceSystemId>?</sourceSystemId>
</v1:company>
<!--Optional:-->
<v11:aircraftEffectivity>
<!--Zero or more repetitions:-->
<v11:aircraftFamily>
<aircraftFamilyName>?</aircraftFamilyName>
<!--Zero or more repetitions:-->
<v11:aircraftModel>
<aircraftModelName>?</aircraftModelName>
<!--Zero or more repetitions:-->
<v11:aircraft>
<aircraftSerialNumber>?</aircraftSerialNumber>
</v11:aircraft>
</v11:aircraftModel>
</v11:aircraftFamily>
</v11:aircraftEffectivity>
<!--Optional:-->
<v11:userEffectivity>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<role_DN>?</role_DN>
<!--Zero or more repetitions:-->
<role_CN>?</role_CN>
</v11:userEffectivity>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Optional:-->
<v1:forcedNotify>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<v1:notificationTarget>
<!--Optional:-->
<userID>?</userID>
<!--Optional:-->
<v1:emailChannel>
<!--Optional:-->
<v1:fromAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:fromAddress>
<!--Zero or more repetitions:-->
<v1:toAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:toAddress>
<!--Zero or more repetitions:-->
<v1:CCAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:CCAddress>
<!--Zero or more repetitions:-->
<v1:BCCAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:BCCAddress>
</v1:emailChannel>
<!--Optional:-->
<v1:SMSChannel>
<message>?</message>
<phoneNumber>?</phoneNumber>
</v1:SMSChannel>
<!--Optional:-->
<v1:portalNotifChannel>
<creationDate>?</creationDate>
<expiryDate>?</expiryDate>
</v1:portalNotifChannel>
</v1:notificationTarget>
<!--Optional:-->
<notificationChannel>
<!--Zero or more repetitions:-->
<userID>?</userID>
<forcedNotifyChannel>?</forcedNotifyChannel>
<!--Optional:-->
<v1:fromAddress>
<v1:emailAddress>?</v1:emailAddress>
<!--Optional:-->
<v1:name>?</v1:name>
</v1:fromAddress>
</notificationChannel>
<!--Optional:-->
<v11:userEffectivity>
<role_DN>cn=owner_purchasing,cn=owner,cn=eservices_basic_access,ou=eservices,ou=groups,dc=bombardier,dc=com</role_DN>
<role_DN>cn=owner_broker,cn=owner,cn=eservices_basic_access,ou=eservices,ou=groups,dc=bombardier,dc=com</role_DN>
</v11:userEffectivity>
</v1:forcedNotify>
<subject>AHMS Notification</subject>
<payload>You are receiving an AHMS notification</payload>
<v1:isGroupingAllowed>false</v1:isGroupingAllowed>
<v1:emailAttachment>
<v1:fileName>?</v1:fileName>
<!--Optional:-->
<v1:fileSize>?</v1:fileSize>
<!--Zero or more repetitions:-->
<Content>cid:354298590057</Content>
<!--Zero or more repetitions:-->
<ContentEncoding>?</ContentEncoding>
<!--Zero or more repetitions:-->
<ContentEncodingType>?</ContentEncodingType>
</v1:emailAttachment>
<!--Optional:-->
<priority>?</priority>
</v1:sendNotificationRequest>
</soapenv:Body>
</soapenv:Envelope>
Any help would be great.
I need to programmatically send the token to the webservice and initiate request and response accordingly
Thanks in advance.

Hi Shawn,
Thanks for your help. I am still struggling. There is a Binary security token element which will contain the public version of the certificate,
with the certificate itself sent along as base64 encoded data.
Below is my code, if you can suggest:
ClientSection clientSection = ClientSection)WebConfigurationManager.GetSection("system.serviceModel/client");
ChannelEndpointElement endpoint = clientSection.Endpoints[0];
string endpointStr = string.Format("Address: {0}; BindingConfiguration: {1}; Contract: {2}", endpoint.Address.ToString(), endpoint.BindingConfiguration, endpoint.Contract);
EndpointAddress remoteAddress = new EndpointAddress(endpoint.Address.ToString());
NotificationServiceClient client = new NotificationServiceClient(endpoint.BindingConfiguration, remoteAddress);
X509Store store = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2 cert = new X509Certificate2();
for (int i = 0; i < store.Certificates.Count; i++)
if (store.Certificates[i].Subject == "E=[email protected], CN=collab-dev.aero.bombardier.net, OU=Aerospace, O=Bombardier Inc., L=Montreal, S=Quebec, C=CA")
cert = store.Certificates[i];
//byte[] rawdata = cert.GetRawCertData();
//BinarySecretSecurityToken token = new BinarySecretSecurityToken(rawdata);
X509SecurityToken token = new X509SecurityToken(cert);
client.ClientCredentials.ClientCertificate.Certificate = cert;
// instead of certificate the enoced token needs to be sent.
Any help would be great. I am totally new to wcf.
Thanks.

Similar Messages

  • Need help parsing a long and passing the value.

    I'm doing Cattle Drve 4b on javaranch.com (http://www.javaranch.com/say.jsp) and I need a bit of help.
    I want to pass the reference of my num value to several small methods to work out the value printed. Here's the original code I did from 4a:
    public class Say{
    public static void main(String[]args){
    int num = Integer.parseInt(args[0]);  // parse argument from command line
    String array[] ={"Zero", "One", "Two", "Three", "four", "five", "six","seven","eight",
               "nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen",
               "seventeen","eighteen","nineteen","twenty","thirty","fourty","fifty",
               "sixty","seventy","eighty","ninety"};     //initialize the array
    //start check for value
    if(num<21)
    System.out.println("\n" + array[num]);
                                            //  \n is added before
    else if(num<30)                                   //  each result for a
    System.out.println("\n" + array[20]+ "-" + array[(num-20)]);     //  cleaner output
    else if(num<40)
    System.out.println("\n" + array[21]+ "-" + array[(num-30)]);
    else if(num<50)
    System.out.println("\n" + array[22]+ "-" + array[(num-40)]);
    else if(num<60)
    System.out.println("\n" + array[23]+ "-" + array[(num-50)]);
    else if(num<70)
    System.out.println("\n" + array[24]+ "-" + array[(num-60)]);
    else if(num<80)
    System.out.println("\n" + array[25]+ "-" + array[(num-70)]);
    else if(num<90)
    System.out.println("\n" + array[26]+ "-" + array[(num-80)]);
    else if(num<100)
    System.out.println("\n" + array[27]+ "-" + array[(num-90)]);
    //endFor 4b I need to be able to print out values in the billions, so I was going to create a few methods to keep it clean like so:
    public class billion (long (int num)
    { if( num<9 billion)
         num-= 8 billion
    System.out.print("eight billion ");
    else if(num<8 billion){
    num-= 7 billion
    System.out.print("seven billion ");
    ....etc
    return num;
    public class million...
    public class thousand...
    etc.And the current main section will be moved into a new "tens" class.
    I'm running into two problems though.
    1. How do you parse a long? I know integers are like so:
    int num = Integer.parseInt(args[0]); are longs the same?
    like:
    long num = Long.parseLong(args[0L])if not, how can I do it?
    2. how do I properly pass num to all the methods? I'm going to make num a public int and make the methods public because that seems simplest, but can I pass num to the method and then return the new value of num back to main?
    BTW, I'll be removing the carriage return from the beginning of the "tens" class when all is said and done so the results don't end up printing on multiple lines.
    Thanks in advance everyone.

    The L suffix is used to identify a Long literal.
    The index of the args[] array does not need to be specified as a Long.
    Solong num = Long.parseLong(args[0]);will suffice. You might want to put that in a try/catch block to catch the NumberFormatException that will be thrown if args[0] cannot be parsed to a long value.
    Various ways to update the value of num in the methods of the same class:
    Simplest of all: declare num as an instance variable. The methods simply access and assign its value.
    Other ways:
    -- pass num as a parameter to the method.
    -- return the value of num from the method (provided the method doesn't have to return any other value)
    -- Have a getNum() method return the value of num
    -- Have setNum() method to update the value of num
    db
    What's that line? public class billion (long (int num)edit Typos, typos...
    Also, the set/get approach with public access is the preferred method when used in the methods of another class.
    Don't forget that the other class has to know whose set/get methods to call.
    Message was edited by:
    Darryl.Burke

  • How can I execute a existing source code in visual studio 2012?

    My friend sent me a mini project(ASP.Net) through mail in a zipped folder. I extracted it and it contains source code and databases. I don't know how to execute it in visual studio 2012. I read that I can do it by choosing Project from existing code option
    from the file menu.But I don't find the option.Kindly help me how to execute that project which I received through mail in visual studio 2012. 

    In case of ASP Web Sites, which do not require solution and project files, go to FILE
    à Open
    à Web Site, then select the folder from File System.
    If nothing work, then perhaps you do not have the required version of Visual Studio. Then give more details or clarify it with your friend. The database probably requires some preparation steps too.

  • Need Help ! how can I Pass Variable from JApplet to PHP?

    I think I post to the wrong forum and I don't know how to change.
    Sorry for messing thing.
    I try to send variable for applet to php but the result is no data was recorded in my database.
    I think the data did not transfer to php.
    I am familiar with php but new to java.
    Actually, I don't know how to send the variable for applet.
    For example, in PHP will receive $_POST['score'] so in applet, I need to send the variable name "score".
    In the book that I use for self-study, mention about servlet but I think PHP is much easier to me.
    So I need to know how set this request data to my applet.
    In internet, I still not get what is clear for me to understand.
    Or I may search with worng keyword or way.....
    Can someone please help me?
    public class test extends JApplet { public test(){ JButton myButton = new JButton("sendData");         myButton.setFont(new Font("Sansserif", Font.PLAIN, 14));         myButton.setSize(15, 10);                 myButton.addActionListener(new button());         add(myButton); } private class button implements ActionListener {         public void actionPerformed(ActionEvent e) {         PostMsg(10,"hello");         } } public void PostMsg(int score, String name){ try {             String data = "name=" + name + "score=" + score;                    byte[] parameterAsBytes = data.getBytes();      // Send data     URL url = new URL("http://localhost/addtest.php");     URLConnection con = url.openConnection();     ((HttpURLConnection) con).setRequestMethod("POST");          con.setDoOutput(true);          con.setDoInput(true);          con.setUseCaches(false);          OutputStream wr = con.getOutputStream();              wr.write(parameterAsBytes);     wr.flush();     // Get the response     BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream())); wr.close();     rd.close(); } catch (Exception e) { System.out.println("ERROR"+e.getMessage()); } } }
    <html> <title>Untitled Document</title> </head> <body> include("../connectionJAVA/connect.php"); $name = $_POST['name']; $score =$_POST['score']; //insert data $sql = "insert into java values(null,'$name','$score')"; mysql_query($sql) or die("error=$sql"); </body> </html>

    rinJava wrote:
    I think I post to the wrong forum and I don't know how to change.Yep wrong forum. This is probably a html/applet/web service sort of question.

  • Hi i got the new ipod 5th generation and the new lifeproof case. its a lot different than what i expected. i really need help on how to put on the cover. i feel like if i dont put it on a certain way or its off by a little my device will break

    i need help with my new lifeproof case

    The instructions below may help.
    http://www.lifeproof.com/en/support/products/ipod/user-guide/

  • How to programmatically retrieve the real field name from a view object ?

    Dear all,
    when I map a business component (a database table) to a view, the fields are automatically converted by JDeveloper, for example, a field named 'user_id' in the oracle table definition, becomes 'userid' in the view.
    The question: how can I retrieve the right table column name from within a backing bean ? Please explain also what should I bind and how; should I use an iterator ?
    Another more: since we can change the label of a field on a view, how can then I get the mapping between the column name on the view and the column name on the table in the database ?
    Thanks in advance,
    Sergio.

    Hi Timo,
    many thanks for your answer.
    The rest of my question: you know we can drop a view from the DataControls onto a ADF page, with each field of the table having a label.
    That label is initially set like the internal table field name, so for instance, if user_id is the real table field name, userid will be the (by JDeveloper) internal renamed table field name, and the label would be userid too.
    If I then change the label text to, for example, "myUserid", the question is: how can I know which real table field does "myUserid" point to ?
    In other words, when my form is submitted, I want to know which field name has been changed and prepare an update sql in a bean.
    For this purpose I bind each view field to a validator function in the bean, and collect al the pairs "label_name + submitted value" in an hash table.
    Now inorder to build up that update query, I need the mapping between the label_name ("myUserid") and the real table field name ("user_id"). The question: how to map the label to the real table field name ?
    By the way, I'm using JDeveloper 11g rel. 2.
    Regards,
    Sergio.

  • Exception has been thrown by the target of an invocation. (mscorlib) - multidimensional project visual studio 2012

    Hi everybody,
    give me please advice... When I set Attribute Relationship in multidimensional project in visual studio this exception is thrown. How to remove this problem? This is exact description of this fail:
    Program Location:
       at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context)
       at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
       at System.Runtime.Serialization.ObjectManager.DoFixups()
       at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
       at System.Resources.ResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
       at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
       at System.Resources.ResourceReader.LoadObject(Int32 pos)
       at System.Resources.ResourceReader.ResourceEnumerator.get_Entry()
       at System.Resources.ResourceReader.ResourceEnumerator.get_Current()
       at System.ComponentModel.ComponentResourceManager.FillResources(CultureInfo culture, ResourceSet& resourceSet)
       at System.ComponentModel.ComponentResourceManager.ApplyResources(Object value, String objectName, CultureInfo culture)
       at Microsoft.AnalysisServices.Graphing.GraphCtrl.InitializeComponent()
       at Microsoft.AnalysisServices.Graphing.GraphCtrl..ctor()
       at Microsoft.AnalysisServices.Design.AR.ARDiagram..ctor()
       at Microsoft.AnalysisServices.Design.AR.AREditor..ctor()
       at Microsoft.AnalysisServices.Design.DimensionDesigner.CreateAREditor(VsStyleToolBar pageViewToolBar)
       at Microsoft.DataWarehouse.Design.EditorWindow.EnsureViewIsLoaded(EditorView view)
    ===================================
    Font 'Arial' does not support style 'Regular'. (System.Drawing)
    Program Location:
       at System.Drawing.Font.CreateNativeFont()
       at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
       at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
       at System.Drawing.Font..ctor(SerializationInfo info, StreamingContext context)
    thanks

    Try asking at
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=visualstudiogeneral&filter=alltypes&sort=lastpostdesc
    Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net

  • Need Help: Web Analysis, Unable to retrieve the data & Security Tab missing

    Hi
    I'm new to Hyperion (our version: 9.2.1) and we're implementing Hyperion Planning. One of the reporting tools is Web Analysis.
    I'm trying to create simple grid reporting. but I'm unable to retrieve the data instead the result is "n/a"
    and
    The File's Properties > Security tab is missing
    Does anyone know my issue?
    Thanks,

    Hi Experts,
    You told its resolved.how?
    I am having the same issue i am unable to retrive the tables.
    "Database:MS SQL Server
    Driver :weblogic.jdbcx.sqlserver.SQLServerDataSource.
    Connection String:jdbc:weblogic:sqlserver://localhost:1433;databaseName=BAM"
    Please help if you have resolved this issue.Any helpful links plz forward [email protected]
    Thanks

  • HT201363 i need help on how to reset my phone, i have forgotten my restrictions code and without it i cant reset my phone, how can i do it?

    please help

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • How we can pass the list of variable from ref cursor ??

    pls explain with example

    Simple example:
    SQL> create table t as select level col from dual connect by level <= 10;
    Table created.
    SQL> create or replace procedure myproc
      2    ( p_num_list in sys.odcinumberlist
      3    , p_ref out sys_refcursor
      4    )
      5  as
      6  begin
      7    open p_ref for select col
      8                   from   t
      9                   where  col in (select * from table(p_num_list));
    10  end;
    11  /
    Procedure created.
    SQL> var rc refcursor
    SQL> set autoprint on
    SQL> exec myproc(sys.odcinumberlist(1,2,3), :rc);
    PL/SQL procedure successfully completed.
           COL
             1
             2
             3
    3 rows selected.
    SQL> exec myproc(sys.odcinumberlist(1), :rc);
    PL/SQL procedure successfully completed.
           COL
             1
    1 row selected.
    Search http://asktom.oracle.com for more examples...
    Also, see:
    The Tom Kyte Blog: Varying in lists...

  • I am getting this error when i run the code in visual studio 2012 ultimate.The code is perfect one but i am getting error. Please help me.Thanks in advance

    WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).

    You should post to the ASP.NET forum.
    http://forums.asp.net/

  • Need help on how implement security.

    Hello everybody,
    I have developed an application with many pages,
    It's time now for me to strat working on the security ....
    I will have the following :
    -Some pages will be accessible by some users but not some others.
    -For some reports, there is a column that will be updatable by some users but nor by others.
    -The users will be grouped into groups.
    I need help on how can I start develop this security model, creating groups perhaps.....
    Thanks for any help.

    Jina,
    Check out Authorization Schemes in the User Guide and under the Security tab in the builder.
    Also search this forum for keywords like "security", "authorization", and "groups"... I think you'll get lots of useful threads.
    Scott

  • How to pass the page item data from tabA to TabB of a discoverer report

    I have a discoverer repoort, it is master_detail (Dept-Emp) report
    TabA is a master worksheet, which has a page item Deptno
    (the data is from a customized query)
    TabB is detail report which has a Deptno as the page item
    which show the emp detail info on this deptno
    (the date is from another customized query).
    What I want to do is;
    When I change the Deptno in TabA, TabB should automatically change to the deptno of Tab A when I click TabB.
    How can I pass the page item deptno from TabA to page item of TabB?
    Thanks for your help

    Hi.
    You are absolutely right, you cannot create a link from Page Item.
    My Idea was (and I'm sorry taht I didn't mention it at the beginning) to create one link for each and every column in the report in the TabA.
    All these links would be exactly same and pass the Deptno to the TabB.
    So the end user can click wherever he wants (all cells on the worksheets have the link to the TabB) and he is always redirected to the TabB with the Department parameter seted to Deptno Page Item from TabA.
    As I already said before, it is not exactly what you expected, but it's probably the best you can get out of Plus.
    Jakub

  • HT2534 but i have problem in step 13.  i can't see  step(13) because the red box that has this message "please contact itunes support to complete this transaction" apears. plz help me how can i pass this step

    but i have problem in step 13. i can't see step 13 because the red box which has this message " please contact itunes support to complete this transaction" apears. plz help me how can i pass this step

    You will need to do what it says, contact iTunes support. Click the Support tab above, then the Get Started link in the Contact Apple Support area and you'll be guided.
    Regards.

  • Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank

    Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
    We like FusionFx Style but would like to keep the background white like blafp style.

    Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.

Maybe you are looking for

  • CrystalReports 2008 crw32.exe has encountered a problem and needs to close.

    Hi Guys, I just installed Crystal Reports 2008 and tried to use it, but every time I try to expand Create New Connection tree, in order to add some data to my report, program crashes and I receive message: u201Ccrw32.exe has encountered a problem and

  • More problems with time capsule on lion

    i have one problem: time machine icon on the desktop is still there after time machine finishes backups (this happens over 50% of the times a backup is made, so it happens several times for day...)... Also, lots of complains about time capsule takes

  • [HTTP:101216]Servlet: "jersey" failed to preload on startup in Web application:"

    Hi, i'm trying to deplay a restful webservice on a WL 10.3  with jdeveloper.  As soon as i try to deploy my webservice i'm getting the follwing error : weblogic.application.ModuleException: [HTTP:101216]Servlet: "jersey" failed to preload on startup

  • Constant Failed Attempts from ASYNC ports

    Our ACS 4.2 Failed Attempts log is being filled by "noise" on the async (tty0/tty1) from both our routers and switches. We have modems attached to our routers primarily on the console ports, in addition we have the aux port of our router connected to

  • Temps d'attente érroné

    bonjour, j'ai besoin pr mon programme d'une temporisation de 5s qui détermine la commande d'un moteur. j'utilise la fonction "attendre un multiple de ms", seuleùment je contaste que l'attente est parfois loin des 5 secondes désirées.. cela est très a