w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Unable to access a locally hosted wcf service over the internet
it's not enough to know only IP of your network if you want access your machine from outside. Probably you should talk to administrator of your network to either establish virtual private network or assign external IP address to your machine. Actually the question related mostly to network administration and configuration, but not to WCF.

Categories : Wcf

How do I access a PHP file hosted on a server?
I figured out the problem. My guess was right: the index.html file was being returned and the json parsor was trying to convert it to jsonobject and hence the error. But this was happening due to another problems which I should have checked: The android app was using http://ipaddress/filename.php for fetching the data from server. When I tried to use the same url on a browser it returned 403 forbidden. I replaced the url with www.sitename.com/filename.php and it returned a json response as expected. After replacing all the urls in the app to match www.sitename.com/filename.php instead of http://ipaddress/filename.php, it started fetching data properly. For some reason, when I used http://sitename.com/filename.php in the android app, it was also returning index.html. I had to replace al

Categories : PHP

How to access other directories of hosted server
Use Server.MapPath for specifying the relative or virtual path to map to a physical directory. string FilePath; FilePath = Server.MapPath("/MyWebSite");

Categories : C#

Access root domain from subdomain on hosted apache server
After wasting time trying to do this with .htaccess files, I finally worked out a way to do it in plain old html. In the header, before all other links, put: <base href="http://mydomain.com/anotherDomain.com" /> And thats it. Remove this for development on your local machine. ;-) Remember to be a bit careful when using the base tag. Edit: I've found this causes other problems. For example, relative links go to http://mydomain.com/anotherDomain.com, rather than http://anotherDomain.com. Adding .htaccess code to the http://mydomain.com root directory like: RedirectMatch /anotherDomain.com(/)?$ http://anotherDomain.com Solves this, but introduces other problems. Still looking for a good answer to this question... Anybody?

Categories : Apache

how to make wcf service hosted in iis access another server active directory
Ok, given the information you gave the problem is the following. The user you use to create the context doesn't have the enough permissions to perform these tasks. You need to grant permissions to this user on he OU the users are created in and all problems should go away. Check this post for more information on the subject http://serverfault.com/questions/190566/what-permissions-are-needed-for-a-helpdesk-admin-to-create-users-in-ad

Categories : C#

Secure API access: best strategy to secure readonly rails api for android client
The most secure method for APIs is to give each user a different authentication token for API. On the other hand, if you want to make it even more secure, I personally suggest you a SSL, because SSL encrypts the packages between server and client, therefore it will be impossible (not impossible but near impossible depending on your SSL certificate) to hijack the communications between server and client.

Categories : Android

Python deployment with virtualenv (on a no-internet-access server)
Three options I would consider: Run your own PyPI mirror with the dependencies you need. You really only need to build the file layout and pull from your local server using the index-url flag: $ pip install --index-url http://pypi.beastcraft.net/ numpy Build virtualenvs on the same architecture and copy those over as needed. This works, but you're taking a risk on true portability. Use terrarium to build virtual environments then bring those over (basically option 2 but with easier bookkeeping/automation). I've done all of these and actually think that hosting your own PyPI mirror is the best option. It gives you the most flexibility when you're making a deployment or trying out new code.

Categories : Python

How to get secure token when using "Hosted Checkout Pages" and RestApiSDK - ASP.Net
It is not currentlypossible. The REST API's do not support the Hosted Checkout payment method. The REST process allows for PayPal transactions (very similar to Express Checkout) and credit card payments (where you pass the billing information to PayPal for verification). The post you mentioned - PayPal's Payflow Gateway SDK Example not working - is for the Payflow SDK and Payflow does not support REST.

Categories : Paypal

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption
Is it databaseName=MyDB or database=MyDB ? Try the latter. Are you on a Windows Machine? http://www.microsoft.com/en-us/download/details.aspx?id=24009 Download that and try to talk to your server outside of your code. The port query tool will show you if its a firewall (or similar) issue, outside of the code.

Categories : Java

Internet Explorer 9 console not available on F12 developer tools
If you hit F12 and only see File, Find, Disable, View, Images, Cache, Tools, Validate, Browser Mode my guess is that the console is minimized. Try Ctrl + M or clicking on the restore window button located to the right of the Browser Mode display. Hope that gets you going.

Categories : Internet Explorer

Is there a secure way to connect to Active Directory from internet?
I think that Active Directory Federation Services might be what you're looking for. Specifically the "Web Single Sign On" functionality. Since you've tagged with question with "insecure-connection" I feel I must add that you should not, under any circumstances let user account data flow in to or out from your company's firewall un-encrypted.

Categories : Vb.Net

No internet access on Android Emulator, Shared Internet Connection
Finally I sorted out my problem. It was problem due to dns server address. I did below steps open CMD Goto your android-sdk/tools path, Like my path is G:Andriod Developmentandroid-sdk ools type this command G:Andriod Developmentandroid-sdk ools>emulator.exe -avd Android_2.3.3 -dns-server 8.8.8.8 -scale 0.75 here Android_2.3.3 is your AVD name, -dns-server 8.8.8.8 will set your DNS address to 8.8.8.8 or 8.8.8.8:55 and -scale will scale your AVD to specified value. this will start a new emulator. Enjoy :) Hope may be helpful to others

Categories : Android

Viewing CSS comments in Internet Explorer's F12 Developer Tools
Whilst not ideal I would have to suggest using firebug lite. https://getfirebug.com/firebuglite It will at least give you half decent tools to view these kind of things.

Categories : CSS

Improving user experience in Windows Forms Client that has low internet speed and uses a WCF web-service hosted far away
First, I assume the btnLike_Click method is called on the UI thread. In this case, do not call changeLike() on a separate thread. async private void btnLike_Click(object sender, EventArgs e) { changeLike(); await LikeContent(); } Second, be sure to marshal back to the UI thread before reloadLikes() async Task<int> LikeContent() { await Global.getServiceClient().addContentLikeAsync(cid, uid); // Ensures this occurs on the UI thread - WinForms Invoke((Action)reloadLikes); return 0; }

Categories : C#

Azure Shared Access Signatures To Restrict Access
Shared Access Signatures are implemented as querystrings containing valid from/to times on the link, along with a hash. You can create a SAS on any blob via any language. Here's a Java tutorial, for example. At this point, you can embed the resultant link into your web page. Should work just like a regular url. SAS isn't going to work against CDN, as CDN is only for public blobs.

Categories : Security

Backup SQL Server DB from Windows Application not hosted on the SQL Server
You need to enable the connection from other computers in your SQL server. This description will guide you through the process: http://msdn.microsoft.com/en-us/library/ms345343(v=sql.105).aspx

Categories : C#

How to restrict access to api
There are various ways you can achieve Web service authentication most basic is via username/password verification over SSL. While many technologies you are implementing your clients and servers offer various kind of authentication and authorization mechanisms. For ex if you are writing code in .net https://www.owasp.org/index.php/Web_Service_Security_Cheat_Sheet Few more examples with Java: http://www.javaranch.com/journal/200603/WSSecurity.html Plain SOAP authentication standard: http://www.whitemesa.com/soapauth.html Google: This

Categories : Api

Access network share from IIS hosted WCF web service
You need to look for the difference between what works and what does not. Things to check are: Does the one that works running in a different application pool with a different identity. Has the identity that does not work lost some rights? Does the one that works use a different user name and password to access the share. Has the passord of the user that does not work expired? Do all map to the same drive letter? Is the drive being used for another share?

Categories : Wcf

Possible to use PHP to simulate an iFrame so I can access the DOM of a non hosted page?
You can use curl in PHP to load the webpage into a variable instead of an IFrame and then output the contents of the variable using PHP wrapped in your layout. In this way, the DOM for all of the content should be accessible with JavaScript.

Categories : PHP

getting "The resource cannot be found" error when trying to access application hosted in IIS
It seems that you are getting a 401.2 status code: HTTP 401.2: Denied by server configuration Description The client browser and IIS could not agree on an authentication protocol. Common reasons No authentication protocol (including anonymous) is selected in IIS. At least one authentication type must be selected. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 253667 Error message: HTTP 401.2 - Unauthorized: Logon failed due to server configuration with no authentication Only Integrated authentication is enabled, and an older, non-Internet Explorer client browser tries to access the site. This happens because the client browser cannot perform Integrated authentication. To resolve thi

Categories : C#

Authenticating to hosted TFS: TF30063: You are not authorized to access .visualstudio.com
Based on visualstudio.com, it looks like you're connecting to hosted TFS. You can enable alternate credentials and then use those credentials to auth via basic auth. If you go to your profile in the web page for TFS (upper right hand corner in hosted), there's a credentials tab. enter a username and password for alternate credentials and you can now send via basic auth header. Programmatically in C# it's: NetworkCredential netCred = new NetworkCredential( "altUserName", "altPassword"); BasicAuthCredential basicCred = new BasicAuthCredential(netCred); Buck blogged about it here: http://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx

Categories : C#

Restrict access to old files after URL Rewrite
You need another rule which redirects the browser to the nicer looking URL if the request is made for the ugly looking one. For example: # need to replace spaces with "-" RewriteRule ^(.*) (.*)$ /$1-$2 [L,R=301] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php?page=([^& ]+)&pid=([^& ]+)&proTitle=([^& ]+) RewriteRule ^ /%1/%2/%3 [L,R=301]

Categories : PHP

how to restrict access to page via url in drupal 6
Although, you can use value of $_SERVER['HTTP_REFERER'] to determine the referrer of current page. But it is not reliable. Instead, you can store this information in cookies & check the current stage of user & take action accordingly.

Categories : PHP

Restrict Access in WCF using FormsAuthenticationTicket, or other method?
This is possible and is commonly used - you have to guard your calls with the principal permission requirement. Here is one of tutorials by myself http://netpl.blogspot.com/2010/04/aspnet-forms-authentication-sharing-for.html Don't let the title mislead you, this is not not only about Silverlight but any other way of accessing the WCF service that is capable of carrying cookies.

Categories : C#

Restrict webpage access with controllers
I think your best bet is just putting conditionals directly into your view, and also manually checking for permission on your controller: <td> <% if (User.IsInRole("Administrators") || User.Identity.Name == item.DomainAC) { %> <%: Html.ActionLink("Edit", "Edit", new { id=item.Id }) %> | <%: Html.ActionLink("Details", "Details", new { id=item.Id }) %> | <%: Html.ActionLink("Delete", "Delete", new { id=item.Id }) %> <% } %> </td> public ActionResult Edit(int id) { var user = GetUserById(id); if (!User.IsInRole("Administrators") && User.Identity.Name != user.DomainAC) { // unauthorized } // authorized - continue }

Categories : C#

Restrict a particular user to access the particular webpage
Try something like this : $allowed_users = array('User2','User3','User4'); if(isset($login_session['login_user'])) { $login = $login_session['login_user']; if (!in_array($login, $allowed_users)) { Header( "HTTP/1.1 403 Restricted Content" ); } }else{ Header( "HTTP/1.1 403 Restricted Content" ); }

Categories : PHP

How to restrict a particular user to access the particular webpage
The problem is that 'User1, User2, User3, User4' is a string. You need to explode() that or somehow make sure that the users are in an array: $allowed_users = array('User1','User2','User3'); if (!in_array($login_session['login_user'], $allowed_users)) { echo "You dont have permission to access this page"; echo '<meta http-equiv="refresh" content="1; url=Admin-Dashboard.php">'; exit(); }

Categories : PHP

WWW::Mechanize to access secure website
WWW::Mechanize does not handle JavaScript. If JavaScript is involved (and it seems so, onclick="submitForm...), use some other module (e.g. WWW::Mechanize::Firefox).

Categories : Oracle

How does a friend assembly restrict the access level?
If using strong names for your assemblies then you will also need to give the Public key of the assembly allowed to access internals. This it is much better in your case since it doesn't rely only on the name. See : http://msdn.microsoft.com/fr-fr/library/bb385840(v=vs.90).aspx However people will still be able to access restricted things using Reflection.

Categories : C#

How to restrict access to certain pages with JSF 2 after user has logged in?
But the answer didn't mention how to block access to page. With response.sendError ? It's fully to your choice. It all depends on your business requirements. Do you want to redirect to login page? Just do that! response.sendRedirect(request.getContextPath() + "/login.xhtml"); Or, do you want to show a scary and user-unfriendly HTTP 401 error? Just do that! response.sendError(HttpServletResponse.SC_UNAUTHORIZED); At least, anything but continuing the request to the restricted resource by chain.doFilter(). Otherwise the whole restriction would be pointless. Also what is the best to use PhaseListener or to use ServletFilter ? A servlet filter is designed to intercept on HTTP requests and runs only once far before FacesServlet is invoked and is therefore capable of hooking

Categories : Security

java security restrict access to jar or packages
following method on above code solves my problem.... @Override public void checkPackageAccess(String pkg) { super.checkPackageAccess(pkg); System.out.println("checkPackageAccess.." + pkg); if (!accessOK()) { if (pkg.startsWith("my.specialpackage.path")) { throw new SecurityException("No access to " + pkg); } } }

Categories : Java

Can you use restrict-ed pointers to access the same object in some cases?
As Eric says the in a comment that is now gone, the key phrase from the C99 draft standard 6.7.3.1 Formal definition of restrict is: `If… X is also modified…` this interpretation is supported by this example in 6.7.3.1/10: void h(int n, int * restrict p, int * restrict q, int * restrict r) { int i; for (i = 0; i < n; i++) p[i] = q[i] + r[i]; } and the following comment with the code sample: illustrate how an unmodified object can be aliased through two restricted pointers. In particular, if a and b are disjoint arrays, a call of the form h(100, a, b, b) has defined behavior, because array b is not modified within function h. So it would seem that your specific example is defined behavior since you are not modifying a or b.

Categories : C

How to restrict access to certain URLs a specific port?
It seems like you're using different context roots (=apps) for the different ports. This shouldn't be done programmatically. Applications that accept different ports or protocols are configured in the server.xml with different Service components: <Server> <!-- Define one Service for the open app --> <Service name="myOpenApp"> <Connector port="8080"/> <Engine name="myOpenApp" defaultHost="localhost"> <Host name="localhost"> <!-- default appBase is webapps --> <Context docBase="path/to/my/open/app"/> <!-- docBase is relative to appBase but may also refer an absolute path --> </Host> </Engine> </Service> <!-- and another f

Categories : Tomcat

How can I handle/restrict user-access to servlets & jsp's?
This can be handled in a Filter and there are great explanation and example in StackOverflow Servlet-Filter wiki. Adapting the code there for your problem (note the addition and usage of the needsAuthentication method): @WebFilter("/*") public class LoginFilter implements Filter { @Override public void init(FilterConfig config) throws ServletException { // If you have any <init-param> in web.xml, then you could get them // here by config.getInitParameter("name") and assign it as field. } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletRe

Categories : Java

Best way to restrict access Java EE RESTFul APIs
There are several. In order of simplicity they are: Block access in the firewall. HTTP-BASIC authentication. API-key (shared secret) authentication. CAS OAuth. It kind of depends on what kind of additional requirements you have. But from your brief description, I would think a simple firewall is the best solution in your case.

Categories : Java

htaccess restrict post access to specific url
To restrict http post, you need to use the "Limit or LimitExcept directives inside VirtualHost or Directory block(if you don't put inside one of these it wont work!). For example, the following will only allow http get in this site under <Directory> ........ <LimitExcept GET> Require valid-user </LimitExcept> If you using .htaccess file, just paste this portion without the Direcotry block <LimitExcept GET> Require valid-user </LimitExcept>

Categories : PHP

Restrict HTTP Access to Elastic Beanstalk
I have restricted HTTP access to an Elastic Beanstalk application to only certain IP addresses. Following is my procedure. Create new beanstalk environment in the VPC(Amazon Virtual Private Cloud). Please read following documents. Using AWS Elastic Beanstalk with Amazon VPC Example: Launching an AWS Elastic Beanstalk Application in a VPC note: I tried to create a new beanstalk environment(Tomcat) in the VPC using AWS Tookit for Eclipse last month. But I could not create a new beanstalk environment due to the bug of AWS Toolkit for Eclipse. Finally, I could create a new beanstalk environment using a elastic-beanstalk-create-environment command. Therefore I recommend to use elastic-beanstalk-create-environment command. Create a new Network ACL(VPC's function) and open the inbound tab and

Categories : Security

Symfony2 - how to display content and secure access to it
To secure css, js and image files you should use Assetic, because Assetic generate new URL's for the assets. For example, here the new URL will be /css/secure : {% stylesheets '@AcmeFooBundle/Resources/public/css/secure-folder/*' output='css/secure/' filter='cssrewrite' %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %} Then you can restrict this route for anonymous users. # app/config/security.yml security: # ... access_control: - { path: ^/css/secure, roles: ROLE_USER }

Categories : Symfony2

Laravel 4 authentication. Restrict access to some functions of a resource but not all
Laravel has a feature that lets you specify filters in the controllers' __construct method using $this->beforeFilter. This function takes a second argument that lets your provide exceptions (or enable the filter only for certain methods). Try using your original routes file and set up your controller like this: class PostsController extends BaseController { function __construct() { // ... $this->beforeFilter('auth', array('except' => array('index', 'show'))); // ... } // ... See Controller Filters in the Laravel documentation. It's not entirely well-documented, but you can also start a deeper journey into the guts of Laravel from here.

Categories : PHP

Restrict image access, making them only accessible from within .NET web application
Given your configuration, I believe your best option is to use URL rewriting. In this case, redirect users to a "fake" image if they are requesting images directly or as referred from some other website (but allowing access to them if referred from a page in your application). To accomplish this, use Microsoft's IIS URL Rewrite extension, which you can download here: http://www.iis.net/downloads/microsoft/url-rewrite Once it is installed on your server, configure it by adding the following to your web.config (since you already have a system.webServer section in your web.config, just add the "rewrite" node into it). Note the inline comments and replacements required. <system.webServer> <rewrite> <rules> <rule name="Whitelist Image Access" stopProc

Categories : Asp Net Mvc



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