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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to Bulk load multiple users into aspnetdb

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :ASP.Net

Hi there,

I'm using VWD 2010 asp.net 4.0 and SQL Server 2008 Express

I created a website that uses security with aspnetdb configuration

now I have hundred users that need to access this website

And I don't want manually insert them one by one

Is there any way (T SQL Stored Proc or ASP.NET VB code) to automated this bulk insert?


Oded Dror 

View Complete Post

More Related Resource Links

how to write a stored proc to prevent multiple users in uploading the reports at a time? plsss help



I wanted to know how to prevent more than one user from uploading the report at a time .I am new to .net ,plss help with the code that would be great.Details are below:

This is a Windos based app written in c# . When User A  clicks Upload option on  one server  from the menu  to upload the files  and at the same time when User B clicks Upload option on different server , User B should be alerted a message saying "User A's uploading is in progress,pls wait" . How to achieve this, plsss help with the code.. I am thinking this logic should be kept in a stored proc, How do I write that proc? plss help


Thanks in advance!

System.Data.SqlClient.SqlException: Bulk load data was expected but not sent

Hi everyone We've had this error twice now from our C# code. Nothing is changing the columns, but I've noticed though that it appears to happen when two threads are attempting to bulk insert into the same table, generally millions of rows. The docs say that SqlBulkCopy.WriteToServer is not guaranteed to be thread-safe, but is this the problem here? It feels like it. I've seen some posts where people appeared to have experienced problems in similar circumstances (http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/85d51484-6381-46bc-bcce-63b58b362d2d). There is no identity column just a non-unique clustered index that is (spid) process keyed to each thread. Do I need to synchronise access to the table for WriteToServer - is this a known problem? Many thanks Reg --- System.Data.SqlClient. SqlException: Insert bulk failed due to a schema change of the target table.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal()   at System.Data.SqlClient.SqlBulkCo

help for autheniticating users in multiple subdomains

Hi All,I have a main website say www.main.com which is developed in asp.net. We have used forms authetications here.Now the thing is I have a no of subdomains on the same server say domain1.main.com, domain2.main.com, domain3.main.com etc.I had put some functionality there. What i want is when i redirect my users to the subdomains user has to log in again. what are the method where i can preserve the users state in my subdomains also.Thanks

Cannot create email alerts for multiple users

Hello, I created an email alert for a document in a library. In the "Send Alerts To" box, I added multiple user names separated by semicolons and saved the alert. However, when I open the alert again, only my user name appears and the additional user names are gone. Why is this happening and how do I fix this problem?  Thank you in advance.

multiple instances of report manager VS multiple users

Hello, I want multiple users to access same report or different reports through report manager for a report server. Will the scenario of opening multiple windows of report manager on same machine and execute reports from all windows simultaneously mean same as multiple users accessing the reports at the same time? If not, then how should I generate the scenario of multiple users? Regards.

1 aspnetdb for multiple domains

Background: My GoDaddy Hoste account currently hostes the website for the entire league, and multiple team websites (with hundreds more to come with growth).  Each team website is built from a template, has a unique URL and is hosted in a directory dedicated to that domain. aspnetdb: Each team's administrator logs into the team website to make changes.  I learned to make use of the Login controls and Microsoft's aspnetdb and was inspired to have one, single aspnetdb database to serve all team websites.  It works just fine, or so I thought.  The problem is that the administrator credentials work for all websites - so the adminstrator for team A can have lots of fun with team B's website. The Question: How do I reconfigure the aspnetdb database to allow for the following: Master Adminstrator (me) that can log into all websites Team Adminstrator that can only log into his/her own team website - not the others. Please help!  Thanks.

Please help to create XML mapping schema for bulk load

Hi all I have XML file <?xml version="1.0" encoding="UTF-8" ?> - <env:ContentEnvelope xmlns="http://???.com/metadata/2009-09-01/" xmlns:env="http://???.com/Envelope/2008-05-01/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" pubStyle="FullRebuild" majVers="1" minVers="0.0"> - <env:Header> - <env:Info> <env:Id>33f49efd-4f7a-4e60-a00f-480edb298e4b</env:Id> <env:TimeStamp>2010-09-14T00:00:39.156</env:TimeStamp> </env:Info> </env:Header> - <env:Body contentSet="MetadataSystems" majVers="1" minVers="0.0"> - <env:ContentItem action="Insert"> - <env:Data xsi:type="CommodityItem"> - <Commodity activeFrom="1900-01-01T00:00:00"> <CommodityId>300007</CommodityId> <CommodityUniqueName>Acid Oils</CommodityUniqueName> <CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404502" language="505074" commodityNameMetadataViewId="404300" commodityNameSequence="1">Acidic oils- an agricultural commodity</CommodityName> <CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404500" language="505074" commodityNameMetadat

add multiple users to sproleassingment


Hi there,

I try to set reading permissions on a list item to sproleassignment for multiple users. But it onyl works for one, as I can see from the permissions which are set afterwards... any ideas?

 Here is my code

 //Auslesen der aktuellen Userdaten
            SPListItem newestItem = workflowProperties.Item;
            //users = Liste der Personen, die Leserechte bekommen
            String[] users = findeVertreter();

            SPList list = currentWeb.Lists["Standardseiten Betreuer"];

            SPListItemCollection itemColl = list.Items;
            SPListItem listItem = itemColl[itemColl.Count - 1];

            //Vererbung aussetzen


inserting data to Users Table in ASPNETDB from Create User Wizard


When a user starts a membership using the Create User wizard supplied by the aspnetdb profile service, I need to add a field to a table in aspnetdb and upon clicking the ContinueButtonClick insert some data.  The field I'll add is "SubscId".  My first question is what table is best for this - Users or Membership?

Secondly, what is the best way to insert new data for this scenario?  code behind?  markup?  Can someone provide basic syntax of insert code in code behind for this scenario?

Can multiple users connect simulateously to an offline cube created by SSAS 2008?


We have created an offline cube on a network drive from SSAS 2008 and users are able to successfully access this serially using the Excel 2003 cube add-in or Excel 2007, in concert with version 10 driver, but when a user is already connected, the second attempt to connect will get the message :

Connection to <filename> server, <dbname> database, <cubename> cube failed.  OLAP Server error: The following system error occurred:  The process cannot access the file because it is being used by another process. ., File system error: An error occurred while opening the '<filename>' local cube file.

This is regardless of whether users connect specifying read-only and we have found it impossible to connect to a cube if the file has the read-only attribute set.

Is there any way to solve this without users taking copies onto their workstations?



Multiple users & arrays?


On my website, the user can enter in information in multiple textboxes and click an "Add" button, which then adds the information to an array as 1 project. When they click a "Finish" button, it takes them to a Review page and reviews all of the seperate projects they have submitted.

When we tested this website out, at one point I got to the review page and saw information that I never submitted. I'm assuming it was submitted by the other person who was testing the page at the same time I was testing the page. 

My question is, if multiple users are on my page at the same time submitting information, is it possible for the information to be added to someone else's array ? Can somebody's information overlap another person's information?

Here's my array:

Option Strict On
Imports System.IO
Imports Microsoft.VisualBasic

Public Class clsBarn
    Structure Barn
        Dim BarnNo As String
        Dim FlockNo As String
        Dim Birds As Integer
        Dim WkMortF As Integer
        Dim WkMortM As Integer
        Dim BirdsAdded As Integer
        Dim AvgHighTemp As Integer
        Dim AvgLowTemp As Integer
        Dim BodyWeight As Decimal
        Dim BirdsUniAmt As Decimal
        Dim GalWtr As Integer
        Dim LightHours As D

Error: Could not load file or assembly 'file:///C:\Users\xxxxx\AppData\Local\Temp\Temporary ASP.NET



I am getting the following error when traying to run a web application project on VS2008, 3.5 sp1.

Error    1    Could not load file or assembly 'file:///C:\Users\xxxxx\AppData\Local\Temp\Temporary ASP.NET Files\website6\729e7299\82e765ff\App_Web_8ysocxbb.dll' or one of its dependencies. The system cannot find the file specified.  

In solution Explorer,  right click on Default.aspx ->  View in Browser, the following error appears on the web page in browser.

The resource cannot be found.

Server Error in '/WebSite6' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /WebSite6/Default.aspx

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; AS

Adding multiple users to a document library column by web service


I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.

load users records in infopath fields without using "run the query" button



is it posible to instead of clicking the "run the query" button to load the users records in the fields that the fields load automatically.

can this only be done with a role and a "set a value's field" action? 

How do I allow multiple users to desing the same InfoPath 2010 form? Preferably using SP 2010 to ho


We have several users who need permissions to edit a template and publish that template to the forms library.

The primary designer creates the template and uploads to a doc library.  Admin staff from all divisions need to be able to flesh out the template and publish for all users.

Session variables are accessible to multiple users?


I have an asp.net website in which users can submit reports. Another tester and I tested this page at the same time and when I went to review the information I submitted, it displayed information that I didn't submit. It displayed the info submitted from the other user.

I use session variables for these values. I don't understand how this happened?

What can I do so each user can individually submit their information without overlapping some one else's information? The plan is for multiple users to be able to use this page to submit their weekly layer reports.

The first example of code is how I add the session variables from the textboxes.

If Session("BarnNo") = Nothing Then
                                'add session variables
                                    Session.Add("FName", FNameTextbox.Text)
                                    Session.Add("LName", LNameTextbox.Text)
                                    Session.Add("WkEnd", Calendar1.SelectedDate.ToShortDateString())
                                    Session.Add("DisplayDate", Calendar1.SelectedDate.ToLongDateString)

                                    Session.Add("BarnNo", BarnNumberTextbox.Text)
                                    Session.Add("FlockNo", FlockNoTextbox.Tex

SSIS - load table from source text file with multiple record lengths


I have a text file that has mulitple records lengths that I need to load into a table.  The file has multiple record types and each record type detemines the length of the record.  Let me try to explain...the file has a balance line 1, multiple detail records, balance line 2, and a trailer record.

The first record is a balance line 1, which has a record length of 144.

Detail records with a record type of inv or crd, will have a record length of 147.  The remaining record types will have a length of 144.

The second to the last record is balance line 2, which has a a record length of 156.

And the trailer record, which has a record length of 162.

Here is a portion of my source file.  I have made each line bold where you can see the rec type.  The record starting with 9999 is the trailer.

077700001BL100000002010100120101008BALANCE FORWARD 0000000000000000001081175D0000000000{0000000000{0000000000{000001081175D00 0000000000{

077701000INV01953172010100120101008GROCERY - DRY 0000000000000000000073504I0000016678K0000000852G0000000000{000000057679D011N 0000093201E010

07779008099000000002010100820101008KC CASH REC. 0000000000000000001081175M0000000000{0000000000{0000000000{000001081175M00 00000000

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