azure cloud service is not aviailable after deployed to virtual network - azure-cloud-services

my WebPortal is hosted in WebRole in a virtual network which will connect to my corp network (site-to-site). but i cannot access it by http://xxxx.cloudapp.net address. need help !
just clarify:
I can access xxx.cloudapp.net if my project is not deployed to VNet (that means I remove NetWorkConfiguration from ServiceConfiguration.Cloud.cscfg
I cannot access xxx.cloudapp.net after my project is in VNet.
I can ping successfully webrole instance IP from my Corp NetWork
1) ServiceConfiguration.Cloud.cscfg
<Role name="WebRole_1">
<ConfigurationSettings />
<Instances count="1" />
<Certificates />
</Role>
<NetworkConfiguration>
<VirtualNetworkSite name="myVNet" />
<AddressAssignments>
<InstanceAddress roleName="WebRole_1">
<Subnets>
<Subnet name="TenantSubnet" />
</Subnets>
</InstanceAddress>
</AddressAssignments>
</NetworkConfiguration>
2) ServiceDefinition.csdef
<WebRole name="WebRole_1" vmsize="ExtraSmall">
<Imports />
<Startup>
<!--omit here, generated <Task> by Add-AzureNodeWebRole -->
</Startup>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
</WebRole>
3) my VNet Config (Get-AzureVNetConfig)
<VirtualNetworkConfiguration>
<Dns>
<DnsServers>
<!-- omit here <DnsServer> -->
</DnsServers>
</Dns>
<LocalNetworkSites>
<LocalNetworkSite name="Local Network">
<AddressSpace>
<AddressPrefix>172.16.0.0/12</AddressPrefix>
</AddressSpace>
</LocalNetworkSite>
</LocalNetworkSites>
<VirtualNetworkSites>
<VirtualNetworkSite name="myVNet" Location="Central US">
<AddressSpace>
<AddressPrefix>10.107.235.0/28</AddressPrefix>
<AddressPrefix>10.107.238.0/28</AddressPrefix>
</AddressSpace>
<Subnets>
<Subnet name="GatewaySubnet">
<AddressPrefix>10.107.238.0/28</AddressPrefix>
</Subnet>
<Subnet name="TenantSubnet">
<AddressPrefix>10.107.235.0/28</AddressPrefix>
</Subnet>
</Subnets>
<DnsServersRef>
<!-- omit here <DnsServerRef/>-->
</DnsServersRef>
<Gateway profile="Large">
<ConnectionsToLocalNetwork>
<LocalNetworkSiteRef name="Local Network">
<Connection type="Dedicated" />
</LocalNetworkSiteRef>
</ConnectionsToLocalNetwork>
</Gateway>
</VirtualNetworkSite>
</VirtualNetworkSites>
</VirtualNetworkConfiguration>
4) Virtual Network diagram

Related

NLog is not logging on Oracle database, Please how can I get it right

I want to log into Oracle database table using NLog but nothing gets logged. Below is NLog.config file am using. Please what am I doing wrongly?
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
throwConfigExceptions="true"
internalLogLevel="info"
internalLogFile="Logtxt.txt">
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<targets>
<target name="database" xsi:type="Database" keepConnection="false" useTransactions="true"
dbProvider="System.Data.OracleClient.OracleConnection,System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
connectionString="Data Source=#####;User ID=######;password=******;Integrated Security=no;"
commandText="insert into DBO_ERRORLOGS(LOGID,LEVEL,CALLSITE,TYPE,MESSAGE,STACKTRACE,INNEREXCEPTION,ADDITINALINFO,LOGGEDONDATE,USERNAME) values('',:LEVEL,:CALLSITE,:TYPE,:MESSAGE,:STACKTRACE,:INNEREXCEPTION,:ADDITIONALINFO,:DATE,:USERNAME)">
<parameter name="LEVEL" layout="${Level}" />
<parameter name="CALLSITE" layout="${Callsite}" />
<parameter name="DATE" layout="${date}" />
<parameter name="TYPE" layout="${exception:format=Type}" />
<parameter name="MESSAGE" layout="${exception:format=Message}" />
<parameter name="STACKTRACE" layout="${exception:format=StackTrace}" />
<parameter name="INNEREXCEPTION" layout="${exception:format=:innerFormat=ShortType,Message,Method:MaxInnerExceptionLevel=1:InnerExceptionSeparator=}" />
<parameter name="ADDITIONALINFO" layout="${Message}" />
<parameter name="USERNAME" layout="${identity}" />
</target>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="database" />
</rules>
</nlog>
Without an error message (see below how to find it), it's a bit guessing. But I think it's an issue you are sending all the parameters as strings. So add the dbType to the parameters, like:
<parameter name="DATE" layout="${date}" dbType="DateTime" />
For the actual error, you should check the internal log. It should be there!
Check Logtxt.txt. See internalLogFile="Logtxt.txt". And you can't find it, change it to an absolute path, e.g. internalLogFile="C:\temp\Logtxt.txt"

Can we change the <soap:address location> dynamically - with JAX-WS

I am new to soap web services,wanted to know can we change the location of soap:address according to the environment it is deployed. I am using jaxws-spring
<binding name="HelloWorldWSPortBinding" type="tns:HelloWorldWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="getHelloWorld"></binding>
<service name="HelloWorldWSService">
<port name="HelloWorldWSPort" binding="tns:HelloWorldWSPortBinding">
<soap:address location="http://localhost:8095/WebServicesExample/hello" />
</port>
</service>
</definitions>

Infinispan/Wildfly: Cannot find a parser for element 'string-keyed-jdbc-store' in namespace

I am trying to configure a JDBC-backed Infinispan cache for storing Hibernate Search indices on Wildfly 10/JBoss EAP 7. I have installed the Infinispan 8.1.x Wildfly/JBoss modules from infinispan.org within my application server, and I've FINALLY gotten a basic infinispan.xml file working with file persistence, and now I am trying to change it over to use JDBC for persistence. My infinispan.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:8.1 http://www.infinispan.org/schemas/infinispan-config-8.1.xsd
urn:infinispan:config:jdbc:8.0 http://www.infinispan.org/schemas/infinispan-cachestore-jdbc-config-8.0.xsd"
xmlns="urn:infinispan:config:8.1" xmlns:jdbc="urn:infinispan:config:store:jdbc:8.0">
<jgroups>
<stack-file name="default-jgroups-udp" path="default-configs/default-jgroups-udp.xml" />
</jgroups>
<cache-container name="HibernateSearch" default-cache="default"
statistics="false" shutdown-hook="DONT_REGISTER">
<transport stack="default-jgroups-udp" />
<jmx duplicate-domains="true" />
<!-- *************************************** -->
<!-- Cache to store Lucene's file metadata -->
<!-- *************************************** -->
<replicated-cache name="LuceneIndexesMetadata" mode="SYNC"
remote-timeout="25000">
<locking striping="false" acquire-timeout="10000"
concurrency-level="500" write-skew="false" />
<transaction mode="NONE" />
<eviction max-entries="-1" strategy="NONE" />
<expiration max-idle="-1" />
<persistence passivation="false">
<file-store preload="true" purge="true"
path="${jboss.server.temp.dir}/indexes" />
</persistence>
<indexing index="NONE" />
<state-transfer enabled="true" timeout="480000"
await-initial-transfer="true" />
</replicated-cache>
<!-- **************************** -->
<!-- Cache to store Lucene data -->
<!-- **************************** -->
<replicated-cache name="LuceneIndexesData" mode="SYNC"
remote-timeout="25000">
<locking striping="false" acquire-timeout="10000"
concurrency-level="500" write-skew="false" />
<transaction mode="NONE" />
<eviction max-entries="-1" strategy="NONE" />
<expiration max-idle="-1" />
<persistence passivation="false">
<string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:8.0"
fetch-state="false" read-only="false" purge="false">
<data-source jndi-url="java:jboss/datasources/InfinispanCacheDS" />
<string-keyed-table drop-on-exit="false"
create-on-start="true" prefix="ISPN_STRING_TABLE">
<id-column name="ID_COLUMN" type="VARCHAR(255)" />
<data-column name="DATA_COLUMN" type="BINARY" />
<timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT" />
</string-keyed-table>
</string-keyed-jdbc-store>
</persistence>
<!-- <persistence passivation="false"> <file-store preload="true" purge="true"
path="${jboss.server.temp.dir}/indexes" /> </persistence> -->
<indexing index="NONE" />
<state-transfer enabled="true" timeout="480000"
await-initial-transfer="true" />
</replicated-cache>
<!-- ***************************** -->
<!-- Cache to store Lucene locks -->
<!-- ***************************** -->
<replicated-cache name="LuceneIndexesLocking" mode="SYNC"
remote-timeout="25000">
<locking striping="false" acquire-timeout="10000"
concurrency-level="500" write-skew="false" />
<transaction mode="NONE" />
<eviction max-entries="-1" strategy="NONE" />
<expiration max-idle="-1" />
<persistence passivation="false">
<file-store preload="true" purge="true"
path="${jboss.server.temp.dir}/indexes" />
</persistence>
<indexing index="NONE" />
<state-transfer enabled="true" timeout="480000"
await-initial-transfer="true" />
</replicated-cache>
</cache-container>
</infinispan>
I am also using the following jboss-deployment-structure.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<!-- Core Java/Java EE Dependencies -->
<module name="javax.transaction.api" export="true" services="import" />
<!-- JPA/Hibernate Search Dependencies -->
<module name="javax.persistence.api" export="true" />
<module name="org.hibernate.search.engine" export="true"
services="import" slot="5.5" />
<module name="org.hibernate.search.orm" export="true"
services="import" slot="5.5" />
<module name="org.infinispan.hibernate-search.directory-provider"
slot="for-hibernatesearch-5.5" export="true" services="import" /><!--
<module name="org.apache.lucene" export="true" services="import" /> <module
name="org.infinispan.lucene-directory" slot="ispn-8.1" /> -->
<module name="org.infinispan.core" slot="ispn-8.1" services="import"
export="true" />
<module name="org.infinispan.persistence.jdbc" slot="ispn-8.1"
services="import" export="true" />
<module name="org.infinispan.persistence.remote" slot="ispn-8.1"
services="import" export="true" />
</dependencies>
</deployment>
</jboss-deployment-structure>
However, when I deploy my application I get the following exception:
ISPN000327: Cannot find a parser for element 'string-keyed-jdbc-store' in namespace 'urn:infinispan:config:store:jdbc:8.0'. Check that your configuration is up-to date for this version of Infinispan.
Everything works fine if I change persistence from JDBC to "file". However, once I put in the JDBC parameters I get the parsing error. I'm sure I'm doing something minor and stupid to cause this, but I can't for the life of me figure out what. Any help would be GREATLY appreciated!!
After trying to investigate this problem I ended opening a bug report:
https://issues.jboss.org/browse/ISPN-7572
The problem is that I expected the org.infinispan.core module to depend on its extensions, but this is not the case. I previously mentioned a wokraround, but editing the module XML files is not enough as there's no easy solution which would be able to maintain the isolation of different modules which need to be isolated.
The problem is fixed now, please upgrade to either Infinispan version 9.0.0.Final which will contain the fix, or get Infinispan 8.2.7.Final as I'll backport this fix as well.

Freeswitch: mod_xml_curl and call groups

I am currently switching from static configs to using mod_xml_curl and have encountered a problem with setting up call groups.
Inside my dialplan (served dynamically, working as expected) I am bridging to a group:
<action application="bridge" data="${group_call(call-group#domain-a.com)}"/>
Freeswitch is making a request with section=directory&action=group_call to the web server, to which I respond with a chunk of the directory containing the group and all relevant users:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="domain-a.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<users>
<user id="john" number-alias="1000">
<params>
<param name="password" value="1234" />
<param name="vm-password" value="1000" />
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1000" />
<variable name="outbound_caller_id_name" value="John at domain-a.com" />
<variable name="outbound_caller_id_number" value="1234567" />
</variables>
</user>
<user id="lucy" number-alias="1001">
<params>
<param name="password" value="1234" />
<param name="vm-password" value="1000" />
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1001" />
<variable name="outbound_caller_id_name" value="Lucy" />
<variable name="outbound_caller_id_number" value="12345678" />
</variables>
</user>
</users>
</group>
</domain>
</section>
</document>
However, group_call() seems to fail and in the logs I get ``:
2016-02-24 10:42:14.249534 [DEBUG] mod_dptools.c:1498 SET sofia/internal/michael#domain-a.com [call_timeout]=[15]
2016-02-24 10:42:14.529107 [CONSOLE] mod_xml_curl.c:323 XML response is in /tmp/2f772a8a-4c3a-46f2-834f-b9ba2c735feb.tmp.xml
EXECUTE sofia/internal/michael#domain-a.com bridge(error/NO_ROUTE_DESTINATION)
Perhaps anyone has experience setting up group calls with mod_xml_curl and could explain what exactly Freeswitch is expecting in the response?
After a little gnashing of teeth, I got this working. The clue was here underneath the group_call description:
Please note: If you need to have outgoing user variables set in leg B,
make sure you don't have dial-string and group-dial-string in your
domain or dialed group variables list; instead set dial-string or
group-dial-string in the default group of the user. This way
group_call will return user/101 and user/ would set all your user
variables to the leg B channel.
So, when you receive an action of type group_call, move the dial-string param to the group level, so instead of
<domain name="domain-a.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<users>
<user id="john" number-alias="1000">
...
send this
<domain name="domain-a.com">
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<users>
<user id="john" number-alias="1000">
...
After I made that change, everything was hunky dory. Cheers!
It's related to your dialplan.It's not generated perfectly. just check the domain-a.com context in the dialplan.

Cordova Plugin add folder to root of project

Making a custom cordova plugin, I need to add the sdk files to the root level of the xcode project, but it always ends up in the plugins folder of the xcode project
how do I add the folders (XIBs and MiSnap_Res) to the root of the project so they are a gold colored folder, not blue, or at least on the project level, outside the plugins folder
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="com.keybank.MiSnapPlugin"
version="0.0.1">
<name>MiSnapPlugin</name>
<description>MiSnapPlugin Custom Plugin Made by Derek Hannah</description>
<author>Derek Hannah</author>
<license>Apache 2.0 License</license>
<engines>
<engine name="cordova" version=">=3.5.0" />
</engines>
<js-module src="www/MiSnapPlugin.js" name="MiSnapPlugin">
<clobbers target="MiSnapPlugin" />
</js-module>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="MiSnapPlugin">
<param name="ios-package" value="MiSnapPlugin" />
</feature>
</config-file>
<framework src="libstdc++.6.tbd" />
<framework src="AudioToolbox.framework" />
<framework src="AVFoundation.framework" />
<framework src="CoreGraphics.framework" />
<framework src="CoreMedia.framework" />
<framework src="CoreVideo.framework" />
<framework src="MobileCoreServices.framework" />
<framework src="QuartzCore.framework" />
<framework src="OpenGLES.framework" />
<framework src="Security.framework" />
<framework src="ImageIO.framework" />
<framework src="Foundation.framework" />
<framework src="Foundation.framework" />
<framework src="UIKit.framework" />
<source-file src="src/ios/libMiSnap.a" framework="true" />
<resource-file src="src/ios/MiSnap_Res"/>
<source-file src="src/ios/XIBs" target-dir="../.."/>
<header-file src="src/ios/include/MiSnap.h" />
<header-file src="src/ios/MiSnapPlugin.h" />
<source-file src="src/ios/MiSnapPlugin.m" />
</platform>
<!--<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="HelloWorldPlugin">
<param name="android-package" value="mobi.monaca.HelloWorldPlugin"/>
</feature>
</config-file>
<source-file src="src/android/mobi/monaca/HelloWorldPlugin.java" target-dir="src/mobi/monaca" />
</platform>-->
</plugin>

Resources