w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Add firewall rules to a vApp Network with PowerCli 5.1
I found the answer, here is is for anyone else who needs it. $vAppNet = Get-CIVAPP 111 | Get-CIVAppNetwork vApp_Network $vApp = Get-CIVAPP 111 $networkConfigSection = (Get-CIVapp 111).extensiondata.GetNetworkConfigSection() $vAppNetwork = $networkConfigSection.NetworkConfig | where {$_.networkName -eq "vApp_Network"} $fwService = New-Object vmware.vimautomation.cloud.views.firewallservice $fwService.DefaultAction = "drop" $fwService.LogDefaultAction = $false $fwService.IsEnabled = $true $fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule $fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule #First Rule $fwService.FirewallRule[0].isenabled = $true $fwService.FirewallRule[0].description = "Allow all outgoing traffic" $fwServic

Categories : Powershell

Can I use SQL Server-2012 Express edition over a network when the FIREWALL is on
You still need to make sure you're connecting through a known port, and open that port on your firewall. In the configuration manager, open the TCP/IP settings. Under IPAll, ensure Dynamic Ports is blank and TCP Port is 1433. Then, make sure 1433 is allowed inbound on your firewall. If you have a network level firewall, check with it's administrators to make sure that port is open. Yes, network sharing will work with the professional edition with a firewall - just need to make sure the correct ports are open.

Categories : Sql Server

WebDAV Server Error 401.2, connection issue with Windows Authentication after pausing virtual server/domain controller
We figured out what was causing our issue although I may not be able to explain entirely why it mattered. In IIS there is a setting in the "HTTP Response Headers" under "Set Common Headers" called "Enable HTTP keep-alive". We check marked this option as true and our Windows Authentication started working again. It seemed to have something to do with the connection not staying open between requests and the application or IIS not realizing the connection was restarted during the SYNC operation.

Categories : Iis

Symfony login unable to find controller for path login_check despite being behind firewall
app/config/security.yml secured_area: pattern: ^/ form_login: login_path: login #this is routing name check_path: login_check #this is routing name logout: path: logout #this is routing name target: / Edit [1] you can try delete this: auth_area: pattern: ^/auth/(login|login_check) anonymous: ~ [2] your path better that: <form action="{{ path('login_check') }}" method="POST"> Edit It is example for login firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false secured_area: pattern: ^/ anonymous: ~ form_login: login_path: login check_path: login_check always_use_default_target_path: true de

Categories : PHP

Symfony 2 event listener - on authentication fail / firewall listener
Take a look at the DefaultAuthenticationFailureHandler class. It should be under SymfonyComponentSecurityHttpAuthentication. This is the default listener that Symfony uses when authentication fails. But you can write your own and use it by adding it to your security.yml like this: firewalls: firewall_name: form_login: failure_handler: your.service.id Here's a complete reference to the security.yml configuration: http://symfony.com/doc/current/reference/configuration/security.html

Categories : PHP

Redirect domain name mapped with external IP (modem) to a host in its local network
If you want to redirect my domain to the particular host you need to setup NAT-Virtual Server Setup . here you need to map remote port to internal map. In above image IP address is my IP of my host and Default address is my router's IP address Now you have configure NAT in you router as bellow. in above image server IP is you host IP address. I am using D-Link router so this Image is according to that if you are using some different router then you might have different view. After configuring this when you type EXTERNAL_IP:80 your request will be forwarded to application that is running on you host with that port

Categories : Networking

Detect user domain in Asp.net Form Authentication
in my intranet application i use something like this : /// <summary> /// Authenticate the user, with windows auth(and domain) /// If that fails then authenticate with forms /// If that fails...well, go to hell /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void loginControl_Authenticate(object sender, AuthenticateEventArgs e) { //First try the windows login (domain+username / password) Logging.IntranetLogger.LogIntranetActionInfo(Logging.IntranetLogConst.Logging, Logging.IntranetLogConst.UserTryToLoggIn, loginControl.UserName); string domainName = GetDomainName(loginControl.UserName); // Extract domain name

Categories : C#

Cross-domain authentication - user identification
Probably not the best way to do it but store an api key on both domains(same key), and when user goes from domain1.com to domain2.com send a variable of the api key and a userid that exists on both domains. Check to see if the api key is valid and if so make sure the user is existent. Also when a user logs in store that in the database and delete it when the user logs out.

Categories : PHP

Shared ASP forms authentication fails on same domain
The issue was in .NET 4.5 there were cryptographic enhancements which meant that although I had the same machine key specified for each app they were decrypted differently. New ASP 4.5 projects have the targetFramework set to 4.5 using the httpRuntime element (see below) while the second project was using .NET 4.0 as it did not have the targetFramework set. <httpRuntime targetFramework="4.5" /> So I could have either targeted .NET 4.5 in the second project or, to avoid any errors from the upgrade, I can specify the second project to use the cryptographic enhancements in .NET 4.5 for the machine key while continuing to use .NET 4.0. <machineKey compatibilityMode="Framework45" />

Categories : Asp Net

Asp.Net Web Form calling same domain WCF service without need for authentication
Try to enable windows authentication in IIS for your hosted service and disable anonymous authentication (if it is enabled). Besides, pass security credentials (domain credentials perhaps in your case) from the client to the service.

Categories : Asp Net

Using Forms Authentication with WebAPI when the client is in a different domain?
Assuming you are using CORS. By default, cookies are not enabled with CORS. In jQuery, you need to set xhrFields: { withCredentials: true } Also, the server must send the response header Access-Control-Allow-Credentials: true.

Categories : Asp Net Web Api

Domain User Authentication in Windows Store Apps?
I was looking for this answer too. I discovered that you have to go to the package.appxmanifest and check off Enterprise Authentication and then you can use CredentialCache.DefaultNetworkCredentials in your app to get the username, but not the password.

Categories : Authentication

c# Active Directory Authentication User if Computer not in domain
I've tried this one. The computer now i'm using is not in domain. try { DirectoryContext context = new DirectoryContext(DirectoryContextType.DirectoryServer, "IP", "Username", "Password"); DirectoryEntry deDoc = Domain.GetDomain(context).GetDirectoryEntry(); } catch (Exception ex) { MessageBox.Show(ex.Message); }

Categories : C#

How to handle error when login with different domain in windows authentication?
In IIS, make sure anonymous access is not selected, only integrated windows authentication needs to be selected. Also I assume you mentioned authentication and authorization tags under <system.web> section.

Categories : C#

Limit Meteor.js built-in Google authentication to a domain
I dont think its possible right now. There is a pull resquest to partly add that functionality: https://github.com/meteor/meteor/pull/1332 The issue with that pull request seems to be that it only fixes the client side of thinges (ie. it only shows accounts from the selected domain when the user logs in). But it does not add any server side checks. Im using the following workaround: In a .js file in the sever folder I have the following code: Accounts.validateNewUser(function (user) { if(user.services.google.email.match(/example.org$/)) { return true; } throw new Meteor.Error(403, "You must sign in using a example.org account"); }); This prevents accounts from being made for domains different from example.org.

Categories : Meteor

ASP.Net Added Form Authentication now not showing domain/username
Now that you are using Forms Authentication, you should be able to use the built in Page.User field to read the logged in user's info: UserN.Text = Page.User.Identity.Name

Categories : Asp Net

Using AngularJS, how to make a cross-domain ajax request with basic authentication?
$resources is a higher level abstraction that utilizes $http, so regardless of which one you choose to use, adding the Authorization header is a valid solution. Head over to the angular $http docs for information on how to do that. If you're doing anything more than hard coding a user/password into your application, you might want to take a look at response interceptors as a way to catch 401s and have your user log in. I've studied this blog post in the past when I was looking for a way to build fluid authentication into my app. I'd definitely recommend it if you're thinking about going down that path.

Categories : Ajax

C# Programmatic Remote Folder / File Authentication In Non-Domain Windows Environment
Impersonation works with Peer/LAN network as well. I got your typical home network with some machines on default "Workgroup" and some on a named one if I remembered doing it on the install. Here is the code I use from my IIS server app to access files on my other computer (without having to have the same user and password on both machines involved, copied from somewhere and modified for my use): using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Security.Principal; using System.ComponentModel; /// <summary> /// Class to impersonate another user. Requires user, pass and domain/computername /// All code run after impersonationuser has been run will run as this user. /// Remember to Dispose() afterwards. /// </summ

Categories : C#

CAN (Controller Area Network) on Android
What you are able to use will be determined by what protocol your devices support. However, the use of a CAN bus is meant primarily to reduce wiring between the components, so implementing it over a wireless protocol is pretty much nonsense. Considering you have the alternatives you mentioned (Ethernet/Bluetooth/Wifi), assuming some kind of TCP/IP network between your devices HTTPS would be a reasonable protocol to use.

Categories : Android

missing of domain and controller under grails-app in GGTS 2.2.1
As I understand the problem is that you don't see some folders (eg domain, controllers, ...) in project explorer. This happend to me once too. The problem was that the imported projected didn't have .classpath file and when you were importing the project grails made one for you. The solution is to copy-paste the original .classpath file or if you don't have the original try to create it from another project.

Categories : Grails

Deployment to instances using JBoss 7.1 as domain controller
In the end I did two things: I am using jboss-web.xml to specify a context root, which is the same for all deployments (which is OK, because we have one deployment for each server group). I started a feature request for the runtime-name parameter which is missing the JBoss 7 Maven plugin: https://github.com/jbossas/jboss-as-maven-plugin/issues/52

Categories : Java

Pointing a domain to a specific controller/action ASP.NET MVC
You can provide each customer a new subdomain. If http://www.abc.com is your main website domain, then your customer acme can have a domain as http://acme.abc.com You can't give directly a new domain to every customer, this is the way out of it.

Categories : Asp Net Mvc

Reuse Devise authentication for custom controller
This is happening because your controller is nested inside the Spree namespace, but your routes are not. If you want to extend Spree's routes, then do this: Spree::Core::Engine.routes.draw do namespace :admin do resources :workflow, :only => [:index, :show] end end

Categories : Ruby On Rails

Can a rails controller request mutual SSL authentication?
You can access you client certificate using the request.cgi certificate = request.cgi.env_table['SSL_CLIENT_CERT'].gsub(/( |-----(BEGIN|END) CERTIFICATE-----)/, ''); Now you can find a user based on this certificate. See http://www.scatmania.org/projects/ssl-client-certificate-authentication-in-ruby-on-rails/ for further information. I am not sure if this works only if you are using a specific server(apache w. passenger e.g.). Edit: http://www.modssl.org/docs/2.8/ssl_reference.html#ToC24 might be useful too.

Categories : Ruby On Rails

Access Grails associated domain classes in controller or view?
I would say it's entirely dependent on the organization of your usage, but generally I try to keep the count of entries in my model small for each render call. If you have a part of the page that needs to display parts of a, a.b, and a.b.c, then passing them in as a single reference to "a" seems fine. If you have different parts of the page you're displaying, one section refers to a, another to a.b, and another to a.b.c, then I would suggest you look up Templating (http://www.slideshare.net/laelfrog/grails-layouts-sitemesh), and pass the "a" into the top section, and pass "a.b" from that top-level page into the section template that uses a.b as "b", etc. so if your controller has: render( view: 'index', model: [a:a] ) index.gsp might look like: <g:render template="toplevel" model

Categories : Grails

Is Maven a framework that provides mainly an archetype like domain.controller-view in grails?
I am not sure if you are reading enough about maven, Maven is a build system which can help you build your application, manage your dependencies, run your tests, create reports and many other things. First link in google result is http://maven.apache.org/ Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. Each application has many dependencies and many small tasks that needs to be done before you can run your application, developers define them in a file called POM and that will be a instruction for Maven to build the application. Maven can do pretty much everything other than writing your code. In that se

Categories : Maven

Trouble Connecting to sql server Login failed. "The login is from an untrusted domain and cannot be used with Windows authentication"
Why not use a SQL Server account and pass both the user name and password? Here is the reason why. In short, it looks like you have an authentication issue. The problem with workgroups is there is no common Access Control List like Active Directory (AD). If you are using ODBC or JDBC, the wrong credentials are passed. Even if you create a local windows account (LWA) on the machine (SE) that has SQL Express installed (SELWA), the credentials that will be passed from your client machine (CM) will be CMLWA.

Categories : Sql Server

custom login controller action grails no render after authentication
I solved it by throwing out what I was doing and writing a custom authentication provider and filter. http://burtbeckwith.com/blog/?p=1090

Categories : Grails

Multiple Domains on single grails application and second domain only with access to one specific controller?
If both domain points to the same server, and Tomcat is used for both as your public facing web server, then you just need to modify the part inside your Grails. In Controller, you can check which domain was used to access your application: def uri = new java.net.URI(request.getHeader("referer")) def domainName = uri.getHost()

Categories : Spring

.htaccess domain directory does not resolve domain.com/domain properly
Replace your code with this code: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{DOCUMENT_ROOT}/$1 !-f RewriteCond %{DOCUMENT_ROOT}/$1 !-d RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+bar[?/s] [NC] RewriteRule ^(.*)$ - [L,R=404] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^bar(/.*|)$ /bar/bar$1 [L] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(.*)$ /bar/$1 [L]

Categories : Apache

A common user model , controller ,authentication and ability for multiple Rails apps
You might use omniauth gem to provide one application to manage its users through the second one (like a Facebook connect, for example). This app's sign in action would just be a redirect to the second one's sign in page. In this case, however, you would have 2 different user tables, which might need synchronization, but for just a simple authentication that could work.

Categories : Ruby On Rails

UserPrincipals.GetAuthorizationGroups An error (1301) occurred while enumerating the groups. After upgrading to Server 2012 Domain Controller
I'm in an environment with multiple domain forests and trusts. I have pretty much this exact same code running on a web site form used to perform user security group lookups across the different domains. I get this exact error in one of the very large domains where group membership can include 50+ different groups. It works fine in other domains forests. In my research I found a thread that looks unrelated, but actually has the same stack trace. It is for a remote application running on SBS. The thread mentions that the error is caused by unresolvable SIDS in a group. I believe these would be what are known as "tombstoned" SIDS in active directory. See the thread here. The thread suggests that finding the tombstoned enteries and removing them from the groups solves the problem. Is it

Categories : C#

convert java domain model from domain A to domain B
You may want to look at DOZER. The lib will allow wildcard transformation of fields (if they share the same name) and also permit custom converter.

Categories : Java

Find machines on local network based on port (network discover) in android
I am assuming you know how to connect to a tcp server. If not, First go through http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/ You can try opening multiple threads with each thread waiting to connect to a specific ip/port ( along with some timeout value ).If the thread produces an exception, that means the connection was unsuccesful. Othewise add that ip address to your Open_Devices list.

Categories : Java

Vertex names by creating a network object via an edgelist (R package: network)
If your ids are sequential integers as in your example, you can produce the adjacency matrix corresponding to the edgelist in your example with: >as.sociomatrix(y.nw)) 1 2 3 4 5 6 7 8 9 10 1 0 0 1 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 1 1 3 0 0 0 0 0 1 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 But maybe you have a different type of id system in your real input?

Categories : R

how the FireWall knows if the transportation is UDP or TCP?
The header of the packets are completely different, TCP is much bigger for example. A stateful firewall needs to intercept the TCP headers to map the packets to its state table, but also stateless firewalls sometimes have techniques implemented to recognize valid TCP or UDP headers. Most home routers (broadband/wireless) make use of this when you are using port forwarding to distinguish between both protocol versions.

Categories : Security

firewall: 2-way UDP communication possible?
Yes this is called NAT traversal (or UDP punch through) and works in a similar way to TCP - the stateful NAT device is aware you recently sent a UDP packet from a certain end point internally to a certain end point outside and for a period will accept UDP packets from the same outside endpoint and forward them to the same internal end point. I always prefer the IETF docs than the plethora of conflicting information out there (including on this site): http://tools.ietf.org/html/rfc5128

Categories : Networking

"Social Network Analysis Labs in R" (Stanford tutorials): Confusion over graph object / network class
I strongly suspect that the tutorial you are trying to follow was developed for igraph version 0.5.4 or earlier. At that time, vertices and edges in an igraph object were indexed from zero instead of one, and the tutorial seems to account for this, judging from the following comment in the tutorial: # IMPORTANT NOTE: Unlike in most languages, R objects are numbered # from 1 instead of 0, so if you want the first element in a # vector, you would reference it by vector_name[1]. HOWEVER, # igraph objects are numbered starting from 0. This can lead to # lots of confusion, since it's not always obvious at first which # objects are native to R and which belong to igraph. Since igraph 0.6, this is not true anymore; vertices and edges in the R interface of igraph are indexed from 1 just like

Categories : R

azure powershell commandlets for vms metrics like cpu utilization ,network in , network out
I'm not sure if API for metrics even exists. But the good news here is if you have Diagnosticts setup as it is described here http://www.windowsazure.com/en-us/develop/net/common-tasks/performance-profiling/ you will have performance counters information stored in your WADPerformanceCountersTable table.

Categories : Azure

android network change broadcast receiver and getting network type
For what you say I understand you're not taking into account that every time the receiver is triggered it creates a new instance, which is destroyed after its work. Even with static variables you don't have persistent values. One solution that worked for me is to use SharedPreferences. Be aware that on API11+ you should use the flag MODE_MULTI_PROCESS, something like this: if (Build.VERSION.SDK_INT>=11) mySettings=context.getSharedPreferences("MyPrefs",Context.MODE_MULTI_PROCESS); else mySettings=context.getSharedPreferences("MyPrefs",0); int netType = mySettings.getBoolean("netType",0); Hope it helps...

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.