phpMyAdmin login prompt
Asalam-o-alikum
It is obvious when ever we install xampp or wamp they just install mysql as a config authentication. Which is somehow a security threat while your server is exposed to internet.
To override these settings of phpmyadmin in xampp follow these steps.
- Find the privileges link on the home page of your localhost phpmyadmin.
- Change the password for the root user by changing the privileges of the root user.
- Now find the following file x:\\xampp\phpmyadmin.config.inc.php
- In config.inc.php find following variable $cfg['Servers'][$i]['auth_type'] = ‘config’;
- Change the config to cookie.
- now find $cfg['blowfish_secret'] = ‘xampp’;
- and fill in/ change a blowfish secret what ever you like as the cookie will save by this name.
- don’t forget to clear the user name and password variable in config.ini.php
This is it now just login to xampp it will prompt you to enter password.
Video Chat Flex
<mx:Application xmlns=”components.*” creationComplete=”startCamera()”> <![CDATA[ private var nc:NetConnection; //var camera:Camera; private var microphone:Microphone; private var nsPublish:NetStream; private var nsPlay:NetStream = null; [Bindable] private var videoRemote:Video = new Video(); private function startCamera():void { //camera microphone trace(microphone); // here //camera.setMode(160, //camera.setQuality(0, //camera.setKeyFrameInterval(24); microphone.rate=8; //videoCamera.clear(); //videoCamera.attachVideo(camera); // nc = nc.connect(“rtmp:/VideoChat”); // get nc.addEventListener(NetStatusEvent.NET_STATUS, { trace(“nc: }); subscribeName.text publishName.text // //setInterval(_root, } // function to monitor the frame rate and buffer length private function updateStreamValues():void { if { //fpsText.text //bufferLenText.text } else { //fpsText.text //bufferLenText.text } } private function subscribe():void { if { // nsPlay // nsPlay.addEventListener(NetStatusEvent.NET_STATUS, { trace(“nsPlay: }); // nsPlay.bufferTime=0; videoRemote.attachNetStream(nsPlay); // nsPlay.play(subscribeName.text); doSubscribe.label } else { // //videoRemote.attachVideo(null); videoRemote.attachAudio(null); nsPlay.play(null); nsPlay.close(); doSubscribe.label } } private function publish():void { if { // nsPublish nsPublish.addEventListener(NetStatusEvent.NET_STATUS, { trace(“nsPublish: }); nsPublish.publish(publishName.text); // nsPublish.bufferTime=0; // //nsPublish.attachVideo(camera); nsPublish.attachAudio(microphone); // doPublish.label } else { // //nsPublish.attachVideo(null); nsPublish.attachAudio(null); nsPublish.publish(null); nsPublish.close(); doPublish.label } } ]]>
xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
= Camera.get();
= Microphone.getMicrophone();
are all the quality and performance settings that we suggest
120, 12, false);
75);
create a connection to the wowza media server
new NetConnection();
status information from the NetConnection object
function(event:NetStatusEvent):void
(“+event.info.code+”)”);
= “guest”;
= “guest”;
uncomment this to monitor frame rate and buffer length
“updateStreamValues”, 500);
(nsPlay != null)
= (Math.round(nsPlay.currentFPS*1000)/1000)+” fps”;
= (Math.round(nsPlay.bufferLength*1000)/1000)+” secs”;
= “”;
= “”;
(doSubscribe.label == ‘Listen’)
create a new NetStream object for video playback
= new NetStream(nc);
trace the NetStream status information
function(event:NetStatusEvent):void
“+event.info.code+” (“+event.info.description+”)”);
set the buffer time to zero since it is chat
subscribe to the named stream
= ‘Stop’;
here we are shutting down the connection to the server
= ‘Listen’;
(doPublish.label == ‘Send Audio’)
create a new NetStream object for video publishing
= new NetStream(nc);
function(event:NetStatusEvent):void
“+event.info.code+” (“+event.info.description+”)”);
set the buffer time to zero since it is chat
attach the camera and microphone to the server
publish the stream by name
= ‘Stop’;
here we are shutting down the connection to the server
= ‘Send Audio’;
asp roles and membership for remote host
Introduction
This article shows how to make role-based security work for a .NET 2.0 application on a shared hosting server using a remote SQL Server 2005 database.
Many have asked the question, “My ASP application uses role-based security, and it works well on my ‘localhost’ with SQL Server 2005 Express. How can I make it work on a production server in a shared hosting environment?”
Differences exist between implementation of a .NET role-based security web application in the development environment and the production environment. I decided to write this article after reading many complaints about newbies not understanding the implementation process. So a few points to be aware of when moving an application from the development machine to the production environment are mentioned here in the article.
Specific data providers and their respective code samples have their links posted in the Data Provider Implementation section and in the References section of this article.
Background
Beginning with the Microsoft .NET 2.0 Framework, role-based access for ASP.NET web applications is controlled by the contents of two files:
- The web.config file
- The ASP.NET schema file
Once these two files are properly configured, Forms Authentication can then be used to create a secure web application.
When using Visual Web Developer (VWD) within its development environment, these two files are automatically configured for use on the localhost with the Cassini web server and a local user instance of SQL Server 2005 Express.
When deploying the application to the production environment, the default data provider must be changed from SQL Server 2005 Express. And the default ASP.NET schema file must be ported to a database file type for use within the web host’s production environment. Porting the ASP.NET schema file then requires that the web.config file be edited to use that file and its associated remote data server.
The web.config File
Among other uses, the web.config file is used to restrict access to directories (folders) of the ASP.NET web site. Within the VWD development environment, the ASP.NET Web Site Administration tool can be used to create access rules for the application’s web folders. This tool makes it easy to set up and configure a role-based security web application by automatically editing the web.config file to update all of the access rules for the application.
Also, web.config is used to declare which data provider to use for the ASP.NET schema file. The database type and connection string must be declared for the data provider.
When deploying the application to the production environment, the ASP.NET Web Site Administration tool cannot be used. And the web.config file must be manually edited with Visual Web Developer.
The ASP.NET Schema File
The ASP.NET schema file (Schema) is a database file, which contains the data schema, tables, views, and stored procedures, which are compatible for use with either the IIS or Cassini web server. Compatibility implies that the Schema must meet the specifications required by ASP.NET, such as… The Schema has specifically named tables with pre-determined table definitions, along with methods to create and access the data.
The Schema is used to identify users, define personalization preferences, define user roles, and to declare membership of users within the defined user roles.
For SQL Server data providers, the Schema can be generated automatically by VWD with the ASP.NET Web Site Administration tool. Or, if the web host allows their use, other tools such as the ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe) or the SQL Server Database Publishing Wizard can create the Schema.
For custom data providers, the developer must create a script to generate the Schema. Examples of such scripts are available from the links for custom providers that follow.
Issues with Data Deployment
By default, the Schema created within the VWD development environment is a Microsoft SQL Server 2005 Express database file, ASPNETDB.MDF, which is placed into the App_Data folder of the web application. The file is accessed by a local instance of SQL Server 2005 Express. The Cassini web server works well under this default scenario.
In a production environment, at least three reasons exist for not using the default Schema deployment scenario:
- On the IIS web server, ASP.NET recognizes only one App_Data folder; the one located in the root directory of the web server. And access to the App_Data folder is usually not allowed, especially in a shared hosting environment. (Imagine hundreds of web sites trying to share a single Schema file. Although in some strange universe, it may be possible to have a set of users, roles, and membership access rules identical to each of the other hosted web sites on the server. But, that situation is improbable in the real world.)
- SQL Server 2005 Express is not designed for production use and is not supported on production servers due to memory management issues.
- In a production environment, a remote database is used and not a local user instance of SQL Server 2005 Express. Local, as in the database server is installed on the same machine as the web server. Remote, as in the database server is not installed on the same machine as the web server.
A Solution to the Data Deployment Issue
A simple solution is to have the web server use a remote database server. And on that remote database server, a uniquely named database Schema exists for each web site having role-based access. ASP.NET can then implement role-based access for each web site on the shared server, according to the access rules particular to any given web site.
Although SQL Server 2005 Express is not supported within a production environment, other data providers can be used for the Schema. Choose a data provider that is supported by the web host.
When changed from the default data provider, the Schema’s data provider must be declared in the application’s web.config file; and the web.config file must then be saved. The application should be momentarily taken off-line, and then placed back on-line for the change in data provider to take effect.
Data Provider Implementation
Thanks to ODBC and OLEDB technologies, custom data providers can be created for practically any database accessible by the .NET web server. Data providers for the Schema may include:
- SQL Server 2005 Express (the default provider)
- SQL Server 2005 (The scope of this article)
- SQL Server 2000
- ODBC
- Active Directory (or Active Directory)
- ADAM
- MySQL (or MySQL)
- SQLite
- Microsoft Access
- Read-Only XML File (Does NOT create Users. Does NOT update Passwords)
While much material exists for implementing a solution to this question, few seem to completely cover the subject. Mainly, because the code samples only show segments of the editing necessary to set up the web.config file.
This code sample includes the entire script of the web.config file. This is the web.config file that worked for my web application. The specifc names have been changed, but the content is valid. Simply substitute your specifics for the generically-subsituted specifics in my code example.
The configuration is for a remote SQL Server 2005 database. For this example:
The remote data server:THEREMOTESERVERURL (For example, 71.05.26.41)
The Schema file:THESCHEMA (A SQL Server 2005 data file, uploaded to the data server) (for example, wafflehut)
The Database Username: THEUSERNAME (for example, whodatis)
The Database Password: THEPASSWORD (for example, slaphappy)
web.config
<!–
Please refer to machine.config.comments for a description and
the default values of each configuration section.
For a full documentation of the schema please refer to
To improve performance, machine.config should contain only those
settings that differ from their defaults.
–>
<add connectionStringName="LocalSqlServer" name="AspNetSqlMembershipProvider"
enablePasswordRetrieval=”false” enablePasswordReset=”true”
applicationName=”/” requiresUniqueEmail=”false” passwordFormat=”Hashed”
maxInvalidPasswordAttempts=”5″ minRequiredPasswordLength=”6″
minRequiredNonalphanumericCharacters=”0″ passwordAttemptWindow=”10″
passwordStrengthRegularExpression=”" requiresQuestionAndAnswer=”true”
type=”System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
<add name="AspNetSqlRoleProvider"
connectionStringName=”LocalSqlServer”
applicationName=”/”
type=”System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a” />
NOTE: For purposes of clarity, the application’s connection string and other configuration data are presented in plain text. Once the application is functional, be sure to secure the application’s web.config file by taking industry-accepted security measures as outlined at the following link: DPAPI and Triple DES: A powerful combination to secure connection strings and other application settings
Summary
Within the Visual Web Developer IDE, the default deployment scenario works well for creating, testing, and debugging a web application. The ASP.NET Web Site Administration tool (WSA) automatically creates the proper web.config file settings for web folder access rules. WSA, also, creates and updates the default Schema file, ASPNETDB.MDF. However, this setup only works in the development environment.
Changes must be made when moving the final completed application to the production environment. Required changes include:
- Creating a blank database on the remote database server. A username and password must be created for the web application to use when accessing the data. The web hosting provider can provide the details of how to access the remote database server to create the new database. The web hosting provider can also help with identifying the correct connectionString to use for accessing the new database.
- Scripting the ASP.NET schema to the new database. The web hosting provider can assist with how best to do this step. Some providers allow the use of a tool, such as the ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe). Other web hosting providers simply have the developer FTP the development datafile to a web folder, and then use a Restore function to populate the blank database file on the remote database server.
- Uploading the application’s directories and ASPX files to the production web server. But, do NOT upload the App_Data folder nor its contents.
- Modifying the application’s web.config file for the connectionString property for the Schema. It must point to the remote database server and the particular Schema data file for the application. Other connectionString properties must also be specified, such as authentication type (Forms Authentication), username and password.
- Modifying the application’s web.config file to update both the membership and roleManager providers. The default providers must each be first removed and then added. The remove step eliminates the default SQL Server 2005 Express provider. The add step must follow the remove step, and it adds the new data provider.
- After the steps listed above are completed; rebuild, save, and test the web application. It should now function well with the role-based security features.
How to add msg box in asp.net
Dim lbl As New Label()
lbl.Text = “<script language=’javascript’>” & Environment.NewLine & “window.alert(‘” + “u can not add more records” + “‘)</script>”
Page.Controls.Add(lbl)
this is too simple
Chief Justice of Pakistan:
افتخار محمد چودھری کی بطور چیف جسٹس بحالی پاکستان کے سوکھے دھانوں مینہ برسنے کے مصداق محسوس ہوتی ہے کہ ایک قانون دان کے ہاتھوں وجود پذیر ہونے والے اس ملک میں قانون کے فتح یاب رہنے کی مثالیں کم ہی ہیں۔
تقریباً دو برس کی معطلی و معزولی کہیے یا جنرل مشرف ، آصف زرداری اور فاروق نائیک کے بقول برطرفی قرار دے دیجیے، ملک کے اعلٰی ترین عدالتی منصب پر جسٹس افتخار محمد چودھری کی بحالی بہت سے اعتبار سے تاریخی ہے۔
انہوں نے تاریخِ پاکستان کے ایسے چیف جسٹس کا اعزاز تو پہلے ہی حاصل کر لیا تھا جس نے ہر طرح کی طاقت سے مالامال اور اسی کے نشے میں مدہوش فوجی آمر کے سامنے سر جھکانے سے نہ صرف انکار کیا بلکہ مستعفی ہونے کو بھی مسترد کر دیا۔ اب اس بحالی سے انہوں نے پاکستان میں بندوق پر میزان کی فتح کی اب تک کی واحد مثال بھی قائم کر دی ہے۔
درحقیقت جسٹس افتخار چودھری کی بحالی کئی اور لحاظ سے بھی غیرمعمولی اہمیت کی حامل ہے۔
سب سے بڑھ کر اس بحالی سے پاکستان کی اب تک کی بدقسمت اور حالیہ دنوں میں بدنام عدلیہ کے لیے اعزاز، افتخار اور تعظیم کا بھی امکان پیدا ہوا ہے۔ مستقبل میں اعلٰی عدلیہ کے جج صاحبان میزان کو انصاف پر رکھتے ہوئے یقینی طور پر اس بات کو بھی مدنظر رکھیں گے کہ ملک کے عوام قانون کی عملداری میں پوری طرح ان کے پشتیبان ہیں۔
اس بحالی سے ایک فوری فائدہ یہ بھی ہوگا کہ مستقبل میں انصاف کی لاش سے گزر کر گاڑیوں پر جھنڈے لہرانے میں کوئی عار محسوس نہ کرنے والے عدل کے ایسے تاجر کہ اب تک جن کی پاکستان میں کمی محسوس نہ ہوتی تھی، شاید اتنی آسانی سے دستیاب نہ ہو پائیں۔ اس جنس کی عدم دستیابی کا نتیجہ لازماً ایک زیادہ بااعتماد اور آزاد عدلیہ کی شکل میں ہی نکلے گا۔
جسٹس افتخار چودھری کے دوبارہ چیف جسٹس کے منصب پر فائز ہونے سے پاکستان کے حکمرانوں کواگر ایک طرف قانون کے سامنے سر جھکانے کی عادت پڑ سکتی ہے تو دوسری جانب سیاستدانوں کو بھی یہ ترغیب مل سکتی ہے کہ سیاست میں قانون کی پاسداری اور سر بلندی کامیابی کی جانب بھی لے جا سکتی ہے۔
یہی بحالی پاکستان میں عدلیہ کے بطور ادارہ جڑ پکڑنے کا باعث بھی بن سکتی ہے کہ آج کے بعد عدلیہ شاید صرف عدلیہ کے طور پر دیکھی جاسکے ناکہ پی سی او عدالتوں، فوجی آمر کی عدالتوں، جمہوری آمر کی عدالتوں، پیپلز پارٹی کی عدلیہ، مسلم لیگ کی عدلیہ وغیرہ وغیرہ کے مصداق۔ اسی طرح شاید جج حضرات بھی خود کو صرف جج سمجھیں ناکہ پیپلز پارٹی، مسلم لیگ، جی ایچ کیو اور ایم کیو ایم وغیرہ کے۔لیکن اس بحالی کے ساتھ ہی جسٹس افتخار چودھری اور ان کا ساتھ نہ چھوڑنے والے انتہائی بہادر اور قابل قدر ججوں کی بڑی ہی غیرمعمولی آزمائش بھی شروع ہوگئی ہے۔
اب تک ججوں اور اعلٰی عدلیہ کو حاکم وقت کے ہاتھ کی چھڑی اور جیب کی گھڑی سمجھ کر انصاف سے مایوس رہے سترہ کروڑ عوام کی بلند امیدوں کا مرکز یہی جج ہوں گے۔ بلوچستان میں وسائل پر اپنا جائز حق مانگنے والا اگر ان ججوں کی جانب دیکھے گا تو لاپتہ ہوجانے والوں کے ورثاء کی نظریں بھی انہی ججوں پر ہوں گی۔ کراچی میں بارہ مئی دوہزار سات کو مارے جانے والے اپنے لہو کا حساب اگر ان ججوں سے مانگیں گے تو اوکاڑہ کے دوردراز کھیتوں میں کئی عشروں تک ہل کی انی سے زمین کا سینہ چیر کر بمشکل جسم و جاں کا رشتہ برقرار رکھنے والے کاشتکار بھی اپنی زمین بندوق کے زور پر چھینے جانے کا ازالہ انہی ججوں کے ہاتھوں چاہیں گے۔
یہی نہیں، اس بحالی کے بعد انتہائی غالب امکان یہی ہے کہ نہ صرف ایسے مقدمات اور ان مقدمات کے فریق ان کے سامنے ہوں گے جو کل تک انہی ججوں پر سب و شتم کرتے رہے۔ اور تو اور ممکنہ طور پر جنرل مشرف پر غداری، آئین شکنی اور بغاوت کے مقدمات بھی انہی ججوں کے سامنے آئیں گے۔ اب تک ثابت قدم رہنے والے اور بطور جج اپنا وقار قائم رکھنے والے منصفین کو میزان اپنے ہاتھوں میں دوبارہ اٹھانے سے پہلے اس بات پر غور کرنا ہوگا کہ کیا یہ بھاری پتھر وہ اٹھا بھی سکیں گے۔
لیکن ان تمام باتوں کے ساتھ ساتھ جسٹس افتخار چودھری کی بحالی کا اصل فائدہ پاکستانی سماج کو ہونا ہے جس کو اس تاریخی کامیابی سے یہ حوصلہ ملا ہے کہ عوام کی طاقت ملک کی تقدیر کا اہم ترین فیصلہ کرا سکتی ہے۔ آج کے بعد حاکم وقت آئین اور قانون کو موم کی ناک بنانے سے پہلے سو بار ضرور سوچیں گے کیونکہ اب آئین اور قانون کی عمل داری کی ضمانت عبوری آئینی احکامات ، آرڈیننس، ایک سو چوالیس اور امتناعی احکامات اور ریاستی طاقت نہیں، بلکہ سترہ کروڑ بااعتماد لوگوں کی شکل میں ملے گی۔
اور سب سے بڑھ کر آئندہ کوئی بھی فوجی طالع آزما بندوق کے زور پر اس ملک و قوم کی قسمت سے کھیلنے سے پہلے کم سے کم سو بار تو ضرور سوچے گا۔ اب یہ توقع کرنا بلاشبہ عجب نہیں ہے کہ ضیاءالحقوں اور پرویز مشرفوں کا ذکر آئندہ صرف سیاہ الفاظ میں تاریخ کے صفحات میں ہی ملے گا۔
قیام پاکستان کے بہت بعد پیدا ہونے والی نسل کے لیے اگر نو مارچ دو ہزار سات قرارداد پاکستان کے برابر تھا تو سولہ مارچ دو ہزار نو کی تاریخ صبحِ آزادی سے کم نہیں ہے۔
How to close popup window automaticaly
How to close popup window automaticaly
This is my first ever post to wrodpress. In this post I’ll tell u how to close pop up window(s) automatically using client side script in asp.net using vb.net
First of all we need to call an event, to process our script, in my case i have called upon a button1.click handles event to process a client side script.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
After calling an event we should place our code to be process inside. Here we call a javascript and store it in a string
Dim clscript As String = “<script language=javascript>window.top.close();</script>”
Finally we can call this custom javascript using a statement either true or false this is up to you when you want to call your script.
If (Not ClientScript.IsStartupScriptRegistered(“clientScript”))
Then
ClientScript.RegisterStartupScript(Page.GetType(), “clientScript”, clrscript)
End If
The final script should look like:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Your Own Script Starts
Scripts End
‘Call Custom Javascript
Dim strscript As String = “<script language=javascript>window.top.close();</script>”
If (Not ClientScript.IsStartupScriptRegistered(“clientScript”)) Then
ClientScript.RegisterStartupScript(Page.GetType(), “clientScript”, clscript)
End If
End Sub
Here in this final step we are registering our custom javascript to our client side variable to call it in asp.net client side events
