.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

Roles on live server

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net
 

Hey guys,

I am having a problem with role authentication on our production server. My configuration is working perfectly on my local system (using .net's inbuilt web server), however when deploying to the production server suddenly I get booted out of directories in which the role is allowed.

I am not using .net's membership/roles tables (aspnet_Membership, aspnet_Profile, aspnet_Users .... etc) But am using my own tables to login a user. I am adding the roles to the FormsAuthenticationTicket and have allowed certain roles to access certain directories under the "members" directory for example here is a snippet of my web.config under the members directory


<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
  <location path="UserManagement">
    <system.web>
&nb


View Complete Post


More Related Resource Links

sql server agent roles and permissions

  
hi does any one have idea of what kind of roles are needed for creating a SQL server agent job and why those roles are needed?? Please Reply ASAP Because i don't have sysadmin rights.........so that other developers can use the same login for creating the jobs Thanks in advance

Checking SQL Server User Roles and Creating SQL Server Users using VB.NET

  
Hello gurus!Firstly I want to apologies if this question is out of place here.. if someone can direct me to the correct forumn great and Thanks!I have a VB.NET application which uses its own Backend Database (MSSQL Server). I need to distribute this application to sites where there will be an existing SQL Server.So I will need to Create the Database on this server. The Application includes methods for building the database on startup if not already connected to one.However the users windows logon may not have the correct permission to connect and create a Database on the Server. I have a DB Setup form in my application which asks for the Servname, Username, Password and Database name. I have catered for Windows Authentication and SQL Server Authentication within the form - the user makes the choice.Assuming they enter a Username and Password for SQL Server Athentication then I will be trying to connect using this user and create the database on the given server. The following is my outline logic:-                                                                  Create db Process                                                                             |                                                                             |                                                               Check Credentials                                                                   / 

Login goes to Sql server for users and to sqlExpress for roles

  
Hi all,I have a site witl forms authentication using te login control. I altered my sql server, I added a connectionstring and used the connectionstring in both, <rolemanager> and <Membership>. That part of the web.config is listed below.The pronlem is that the login control goed to SQLserver to check the users and their passwords, but it goed to the SQLExpress database for the roles..... who can help me because it's driving me crazy!!!!!!<connectionStrings>    <clear/>    <remove name="Conn"/>    <add name="Conn" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False"                       providerName="System.Data.SqlClient"/>    <remove name="LocalSqlServer"/>    <add name="LocalSqlServer" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False" providerName="System.Data.SqlClient"/>  </connectionStrings>  <system.web>    <membership>      <providers>     &nbs

SQL Server 2008: unable to grant server roles

  

SQL Server 2008 Enterprise (10.0.2531.0) installed on SQL Server 2003 R2 SP2.

I am logged in as sa and I try to grant sysadmin (or any server role) to a new account (either windows or sql authentication) and it fails without an error. If I use the gui in the management studio it says okay but when you check the role is not granted. If I use t-sql command (sp_addsrvrolemember) it doesn't generate an error but again nothing happens. The role is not granted.

Help.


throw exception message giving internal server error on live site

  

using vb.net/asp.net 2005

when a user enters a bad email I am doing a check on this and throwing an exception message as follows, this works fine on the test site but for some reason the same code on the live site gives a "internal server error" (http code 500).  The code below:

            If isThisEmailValid(strEmailThatTheUserEntered) Then
		'do something

            Else

                Throw New Exception("You entered a bad email address.")

            End If


not certain why this is happening, I assume that it's some server or config difference between the test and live sites.  has anyone seen this before?  For a quick fix i'm registering javascript alert and showing the same text so it works but I would like to figure out why the code above is not working.

as always, thanks for your feedback

MC


implementing roles on live website

  

I have an live website and I need to enable roles and add it to a folder.  What's the best way to go about it?  Do I add code to web.config?  Do I add code to individual pages?  Do I use the membership provider service with V W D and recopy the website?  Please  help.


SQL Server Remote Access not work with Live IP Address

  

I have one server which has OS Windows 2003 Server I have installed SQL Server 2005 Express Edition in that I have connect my Internet with this pc directly with Live ID.

 

But when i try to connect SQL server from internet it give me bellow mention error.

 

TITLE: Connect to Server
------------------------------

Cannot connect to xxx.xxx.xxx.xxx\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Download from live server + asp.net

  

hi,

I want to download file from onw of the live server

suppose i want to download file from path "http://www.nikunj.com/file/sample.wmv".

if i am using below code than i got error: 

'http://www.nikunj.com/file/sample.wmv' is not a valid virtual path.

//Set the appropriate ContentType.
Response.ContentType = "Application/Octed-Streamf";
//Get the physical path to the file.
string FilePath = MapPath("http://www.nikunj.com/file/sample.wmv");
//Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath);
Response.End();


Please help me.

Nikunj

HttpContext.Current.User.IsInRole() caching roles on server

  

I am trying to authorize my users against AD groups via HttpContext.Current.IsInRole() method. However the roles are getting cached on the server. Say support, I add myself to a group and verify against that group, I am not getting authorized. Is it possible to clear cache everytime before verification or as soon as i add myself to a group the cache should get cleared.

I do not use membership provider or any such config keys in my vs2008 project.


URL Rewriting works on localhost, not on inetput wwwroot or on live server

  

Hi guys,

I'm making a website and i have made a url rewriting module which works on my Visual Studio localhost area, but not on the Internet on a server or on my local machines inetpub wwwroot area. Any ideas what I need to tweak in IIS to fix it?

I'm on a windows 7 machine writing in VB.Net, using IIS 7.

 

Heres some of my code (which does work on localhost when i start the VS2008 debugger)

This is my web.config insert

		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="UrlRewriteModule" type="theLibrary.rewrite"/>
		</httpModules>

Here is my rewriter itself, a bit scrappy but it works!

 

Imports System.Web
Imports System

Public Class rewrite
    Implements IHttpModule

    Public Sub Dispose() Implements IHttpModule.Dispose

    End Sub

    Public Sub Init(ByVal application As System.Web.HttpApplication) Implements IHttpModule.Init
        AddHandler application.BeginRequest, AddressOf Me.application_BeginRequest
        AddHandler application.BeginRequest, AddressOf Me.application_EndRequest
    End Sub
    Private Sub application_BeginRequest(ByVal sender As Object, By

live connections in sharepoint 2010 server site

  

How to find out number of live connections in sharepoint 2010 server site(intranet and internet)?

I Mean command for find out  active session(how many users accessing site?) on sharepoint server sites?

intranet and internet

can we findout using netstat command?please guide me

tel me options for findout users session


Thanks Mohan Periyasamy

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

  
In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.


jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

  
If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

jQuery live() and ASP.NET Ajax asynchronous postback

  
The issue is that normally $(document).ready() is called when the DOM is ready to be manipulated. But this doens't happen after an ASP.NET Ajax asynch postback occurs.

This means that the initial jQuery bindings won't be automatically available after the asynchronous postback is over. I underline "automatically" here because my last post describes more possibilities, how this issue can be worked around.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend