mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
430
Commits
xcode8
...
mono-4.2.4.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71b88f3e54 | ||
|
|
6ed1bf0a6f | ||
|
|
7e2027e0e1 | ||
|
|
c58ec521ab | ||
|
|
79e81d4c8e | ||
|
|
c45c78b0c7 | ||
|
|
4e6088d3f0 | ||
|
|
13f2557a3c | ||
|
|
123cd63542 | ||
|
|
24f4acb57a | ||
|
|
d2a0cd87a0 | ||
|
|
8c153e8f5c | ||
|
|
e06b13972e | ||
|
|
59eac64fcf | ||
|
|
832de4b8b4 | ||
|
|
735c3907df | ||
|
|
eef138022d | ||
|
|
ee33394503 | ||
|
|
1135ffa7e5 | ||
|
|
1a24b945df | ||
|
|
390560f898 | ||
|
|
d9d3a13cdd | ||
|
|
8497921397 | ||
|
|
217b7f002f | ||
|
|
f4a0a0218f | ||
|
|
8abc7e164c | ||
|
|
272d012642 | ||
|
|
1409b15a45 | ||
|
|
175c4093fd | ||
|
|
dec06f41a7 | ||
|
|
1e5792afb0 | ||
|
|
5542212864 | ||
|
|
e173ad882d | ||
|
|
55f343859e | ||
|
|
28498d9ba7 | ||
|
|
77f20d34de | ||
|
|
971c68401a | ||
|
|
e07ac9d9ec | ||
|
|
8b0e7164b7 | ||
|
|
2e55c43203 | ||
|
|
1bd3c14687 | ||
|
|
95ff24403a | ||
|
|
2e19bf113b | ||
|
|
0b95069fd4 | ||
|
|
8237bc9af6 | ||
|
|
046cd23b40 | ||
|
|
4732507d62 | ||
|
|
640b9d0741 | ||
|
|
7b877872dd | ||
|
|
7ad84f7adc | ||
|
|
923059c639 | ||
|
|
2b911f11ed | ||
|
|
11c13515c4 | ||
|
|
0ce7f78a7f | ||
|
|
1c651584e2 | ||
|
|
c043855ce2 | ||
|
|
c70aa59fc2 | ||
|
|
21fbd4eeb8 | ||
|
|
43b9ad0a72 | ||
|
|
d31c05479d | ||
|
|
e5fad40671 | ||
|
|
e409334f88 | ||
|
|
146b74df48 | ||
|
|
c9dffe293b | ||
|
|
c11e75e8e0 | ||
|
|
3ddba85dc9 | ||
|
|
65fad4874c | ||
|
|
9e29889f02 | ||
|
|
125833a11d | ||
|
|
71a3d43327 | ||
|
|
91d47d27c8 | ||
|
|
a433b69a80 | ||
|
|
9e61c73cb0 | ||
|
|
39edf24948 | ||
|
|
02bfbe0481 | ||
|
|
1c09a56dc5 | ||
|
|
11bf512481 | ||
|
|
9caf0258a8 | ||
|
|
cf84931d51 | ||
|
|
24e1d03575 | ||
|
|
bb6d8b94e6 | ||
|
|
70ef083e21 | ||
|
|
58731e1bbb | ||
|
|
b0736716ee | ||
|
|
a7605b3ba7 | ||
|
|
30015f1127 | ||
|
|
599d21e79a | ||
|
|
677ccd3670 | ||
|
|
a3170c6652 | ||
|
|
90ae50f236 | ||
|
|
5ded2191cd | ||
|
|
b2a9512d01 | ||
|
|
b370336cd5 | ||
|
|
87e626328a | ||
|
|
7be29019a8 | ||
|
|
da922677a8 | ||
|
|
6dd2d0d52b | ||
|
|
e39caabfc4 | ||
|
|
ce72e1ff24 | ||
|
|
5a86dd3421 | ||
|
|
cb99470f97 | ||
|
|
a997e5af7f | ||
|
|
4576dc8594 | ||
|
|
110fdd8baa | ||
|
|
8862921b86 | ||
|
|
7c0dc31b21 | ||
|
|
d41309c59d | ||
|
|
ebe6609165 | ||
|
|
158c7da277 | ||
|
|
fda525b873 | ||
|
|
fc228e416c | ||
|
|
c706a85c7b | ||
|
|
e8594766a8 | ||
|
|
6ff1c569c9 | ||
|
|
e665173c67 | ||
|
|
9ab01f838f | ||
|
|
7e72f20d1e | ||
|
|
66852f89aa | ||
|
|
704e30fddd | ||
|
|
165249622b | ||
|
|
545185ec94 | ||
|
|
e8d2ecaa4d | ||
|
|
b50293b53d | ||
|
|
b37aa3fc8a | ||
|
|
54ce6bd6ed | ||
|
|
b89abf868e | ||
|
|
3c2754755b | ||
|
|
390acad06d | ||
|
|
f2908d1a5a | ||
|
|
d8b68fd578 | ||
|
|
28af3f202a | ||
|
|
29c1622b37 | ||
|
|
fd21271747 | ||
|
|
70539135ea | ||
|
|
155e48717a | ||
|
|
92f4544a12 | ||
|
|
cc1cf601d6 | ||
|
|
c75e47b524 | ||
|
|
804ddbc632 | ||
|
|
328e048e15 | ||
|
|
e325236fa3 | ||
|
|
aa64024074 | ||
|
|
3b2029216e | ||
|
|
77972f864d | ||
|
|
4a18c575ac | ||
|
|
4010f73b57 | ||
|
|
0fd8e508db | ||
|
|
c22742e3f8 | ||
|
|
d120a48340 | ||
|
|
d983aa605a | ||
|
|
3b0d49736f | ||
|
|
5c4305818c | ||
|
|
2d9372887c | ||
|
|
628dfbbc89 | ||
|
|
b5fa2b4eda | ||
|
|
cf5a450af3 | ||
|
|
486936d464 | ||
|
|
d0b9c74d35 | ||
|
|
5fa2fd3d5c | ||
|
|
77de476c44 | ||
|
|
20f555aefb | ||
|
|
4a7fcac075 | ||
|
|
11ce499c40 | ||
|
|
90c1daf7dc | ||
|
|
dbd64296dc | ||
|
|
19130f7816 | ||
|
|
4fd72b41e7 | ||
|
|
c02307527f | ||
|
|
e82dc9b80a | ||
|
|
58a0d6c0f4 | ||
|
|
588a9dfb97 | ||
|
|
070414b678 | ||
|
|
924615b32a | ||
|
|
c9a6d708a9 | ||
|
|
749a6d407e | ||
|
|
4a1653412f | ||
|
|
ec95d97fa6 | ||
|
|
b72b8b187d | ||
|
|
a3bcbb7b58 | ||
|
|
74ea9f56e3 | ||
|
|
537f1de77a | ||
|
|
c39fc0cecc | ||
|
|
b2cd2b28fc | ||
|
|
67805650b9 | ||
|
|
ec3afb7da4 | ||
|
|
6a6343c5da | ||
|
|
d0f6e32026 | ||
|
|
413cb9b41a | ||
|
|
5382fc7b11 | ||
|
|
f215040500 | ||
|
|
1ba5bc6aa7 | ||
|
|
f41fa10aa8 | ||
|
|
4c84f3c99d | ||
|
|
312c249d36 | ||
|
|
fa0059bb83 | ||
|
|
f180a0aa3b | ||
|
|
b17dda2348 | ||
|
|
864629bacd | ||
|
|
9871c89692 | ||
|
|
90d7758e2e | ||
|
|
8eff004670 | ||
|
|
d3f3d95a1c | ||
|
|
a88262b52b | ||
|
|
8486317e0b | ||
|
|
7d8a09f2ed | ||
|
|
393fd6001e | ||
|
|
cd90e8c706 | ||
|
|
f902ecd5be | ||
|
|
595392d965 | ||
|
|
557e9f5c0b | ||
|
|
2701b19413 | ||
|
|
6dec86a023 | ||
|
|
70c6478d97 | ||
|
|
c24df31a2d | ||
|
|
a832ca5578 | ||
|
|
90877bd0fb | ||
|
|
fb9b4f8789 | ||
|
|
ae33495a12 | ||
|
|
9173d8aa78 | ||
|
|
9b990f2b19 | ||
|
|
296bc43db3 | ||
|
|
bb2eacec40 | ||
|
|
6f87943866 | ||
|
|
d3e75456b3 | ||
|
|
f4de388789 | ||
|
|
801e6f8760 | ||
|
|
b81f846775 | ||
|
|
4ca894aaf4 | ||
|
|
0c74c0342c | ||
|
|
cdc35fc76b | ||
|
|
7e42365186 | ||
|
|
1d2c58215f | ||
|
|
220b9ba759 | ||
|
|
0b1360c8e3 | ||
|
|
cff09392e1 | ||
|
|
08b7103fef | ||
|
|
4b31a4cd57 | ||
|
|
a22465351b | ||
|
|
4fd7f72a55 | ||
|
|
5345159fdd | ||
|
|
34ea1c350f | ||
|
|
917c8f6b12 | ||
|
|
66ddca9cbc | ||
|
|
880b0ddde1 | ||
|
|
644d8d6571 | ||
|
|
b4ff1e3d0f | ||
|
|
05d33f1888 | ||
|
|
afdc35694b | ||
|
|
14804f4582 | ||
|
|
044b879cfb | ||
|
|
186ce2fc46 | ||
|
|
0900418353 | ||
|
|
12eefdae82 | ||
|
|
a1c8874b2c | ||
|
|
376b2c32bb | ||
|
|
5048da46fe | ||
|
|
eede15eb71 | ||
|
|
5bcb420286 | ||
|
|
3f07b978c4 | ||
|
|
0d47e98ca4 | ||
|
|
abc5449308 | ||
|
|
5bcc48192c | ||
|
|
ac5452a1b9 | ||
|
|
b892a92153 | ||
|
|
8abcfa68f6 | ||
|
|
012cc7f646 | ||
|
|
3396738374 | ||
|
|
64e24dffc1 | ||
|
|
33a75810b5 | ||
|
|
2d1c17d47e | ||
|
|
c133880bc4 | ||
|
|
6b6e7ca19e | ||
|
|
c109f9ca03 | ||
|
|
3b17abfb9b | ||
|
|
8331376182 | ||
|
|
84b3dda86f | ||
|
|
e8c3f7719e | ||
|
|
ae9fcd19f0 | ||
|
|
5a5d899da0 | ||
|
|
bf863dbc46 | ||
|
|
362468798c | ||
|
|
118291ff5d | ||
|
|
2610994023 | ||
|
|
53b8083989 | ||
|
|
59f2da8400 | ||
|
|
44ba163605 | ||
|
|
8373e4943d | ||
|
|
65b1b10846 | ||
|
|
3409240895 | ||
|
|
3a7212a46e | ||
|
|
24b917c8a1 | ||
|
|
2efa0cc807 | ||
|
|
5f01b80b43 | ||
|
|
b3838e42d1 | ||
|
|
eb2aad684f | ||
|
|
080036d99b | ||
|
|
eafd3db1ab | ||
|
|
1f85a26443 | ||
|
|
27b4ff05b6 | ||
|
|
c59699fa3b | ||
|
|
5fa2f04f19 | ||
|
|
e665f8967e | ||
|
|
cb6829d336 | ||
|
|
2fabccfb08 | ||
|
|
9391cdcd27 | ||
|
|
86084a1870 | ||
|
|
c68e23c85c | ||
|
|
72275b5e74 | ||
|
|
8a26b5a034 | ||
|
|
20cf9e3dbf | ||
|
|
510f4d4f71 | ||
|
|
ec44efbd8d | ||
|
|
1ca4d2bc72 | ||
|
|
9f936798b8 | ||
|
|
4400165ac2 | ||
|
|
29de937efd | ||
|
|
9c9500fe48 | ||
|
|
b440f7a673 | ||
|
|
eabc704b94 | ||
|
|
235168ae74 | ||
|
|
9c71282be7 | ||
|
|
e4c78936cd | ||
|
|
40024f85b8 | ||
|
|
23e0541b01 | ||
|
|
0d045cb82b | ||
|
|
44a3f5cb6a | ||
|
|
3784c69c2f | ||
|
|
2c821dd384 | ||
|
|
1d9c46ad68 | ||
|
|
c68dc66765 | ||
|
|
95cb416bbf | ||
|
|
add93988d1 | ||
|
|
f3fd8cb951 | ||
|
|
f8f6a0d431 | ||
|
|
b261748f35 | ||
|
|
f822059758 | ||
|
|
e882a125ee | ||
|
|
554247cd6a | ||
|
|
7c7b648cf1 | ||
|
|
815079d694 | ||
|
|
4e13efc5de | ||
|
|
83af81148a | ||
|
|
cbf56e58ce | ||
|
|
7128850271 | ||
|
|
4c276327d3 | ||
|
|
1e9aea859d | ||
|
|
b67536d46e | ||
|
|
4dcaef892a | ||
|
|
f2b1ae76b5 | ||
|
|
88a3f06371 | ||
|
|
2bc21e8d37 | ||
|
|
9f552c56d4 | ||
|
|
e3fec9e89d | ||
|
|
0844ab738a | ||
|
|
2b4bd5351e | ||
|
|
ffb69e3ed0 | ||
|
|
5a20bf3669 | ||
|
|
aac7b3d216 | ||
|
|
abe3adff5f | ||
|
|
5e0a6c3b13 | ||
|
|
370d4195f0 | ||
|
|
18c9d7d27f | ||
|
|
80dc792e4c | ||
|
|
e821deecbc | ||
|
|
be33fcad91 | ||
|
|
0d209f09ad | ||
|
|
7830885e02 | ||
|
|
7dc9cf81bc | ||
|
|
0c3c93efb5 | ||
|
|
9e9fecc45a | ||
|
|
fb56b1a52f | ||
|
|
ecd44a1678 | ||
|
|
888874ab45 | ||
|
|
4e98727a7d | ||
|
|
3903d320ec | ||
|
|
16d09c2059 | ||
|
|
6b8a4e5f3c | ||
|
|
79c20ee775 | ||
|
|
05f2e5e522 | ||
|
|
42ca455df2 | ||
|
|
4ad996b1e1 | ||
|
|
95333c0a5c | ||
|
|
09212389e2 | ||
|
|
ed5e137a72 | ||
|
|
5e097d4d49 | ||
|
|
a112354a21 | ||
|
|
7128196f5c | ||
|
|
604017a71d | ||
|
|
8ccfe0f8ff | ||
|
|
1daadd26c5 | ||
|
|
3c7f754d94 | ||
|
|
fa2f8d903d | ||
|
|
f1ffee0453 | ||
|
|
31d5a3eaf4 | ||
|
|
2d4f6b3442 | ||
|
|
87e9d0314a | ||
|
|
339f080a2a | ||
|
|
ebd6235cd3 | ||
|
|
ece83305f8 | ||
|
|
b7a2903b28 | ||
|
|
65c54d2d84 | ||
|
|
de99b00081 | ||
|
|
679e726432 | ||
|
|
6d52dee3d4 | ||
|
|
ec55965085 | ||
|
|
8a63d50e64 | ||
|
|
6604c8c595 | ||
|
|
146772f894 | ||
|
|
b956524379 | ||
|
|
82c2ba94d3 | ||
|
|
96df0a76c4 | ||
|
|
166dca4754 | ||
|
|
5318b06bda | ||
|
|
8c31e362af | ||
|
|
59adeedd90 | ||
|
|
74cd6414be | ||
|
|
57e4ed9c5d | ||
|
|
0bf72ac919 | ||
|
|
94e31f159f | ||
|
|
a7c3e83d98 | ||
|
|
f7816d844a | ||
|
|
6bfb7e6d14 | ||
|
|
5d93b2a292 | ||
|
|
f3e35f228c | ||
|
|
6efe705614 | ||
|
|
7bb3b98f58 | ||
|
|
3d47daa63d | ||
|
|
e22887717f | ||
|
|
01dcc6c162 | ||
|
|
5b12d9ae37 |
No files matched your search
+1
-1
@@ -23,7 +23,7 @@
|
||||
[submodule "external/referencesource"]
|
||||
path = external/referencesource
|
||||
url = git://github.com/mono/referencesource
|
||||
branch = mono
|
||||
branch = mono-4.2.0-branch
|
||||
[submodule "external/reference-assemblies"]
|
||||
path = external/binary-reference-assemblies
|
||||
url = git://github.com/mono/reference-assemblies.git
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ DISTCLEANFILES= mono-uninstalled.pc
|
||||
mcslib = $(mcs_topdir)/class/lib
|
||||
monolite = $(mcslib)/monolite
|
||||
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
|
||||
monolite_url = http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
.PHONY: get-monolite-latest
|
||||
get-monolite-latest:
|
||||
-rm -fr $(mcslib)/monolite-*
|
||||
|
||||
@@ -497,3 +497,4 @@ to do at all), first edit `.gitmodules` to point to the new location, then:
|
||||
The desired output diff is a change in `.gitmodules` to reflect the
|
||||
change in the remote URL, and a change in /<submodule> where you see
|
||||
the desired change in the commit hash.
|
||||
|
||||
+16
-12
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [4.3.0],
|
||||
AC_INIT(mono, [4.2.4],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -3491,10 +3491,11 @@ case "x$libgc" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(profile4_5,[ --with-profile4_5=yes,no If you want to install the 4.5 FX (defaults to yes)], [], [with_profile4_5=yes])
|
||||
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
|
||||
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
|
||||
AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
|
||||
AC_ARG_WITH(profile4_5, [ --with-profile4_5=yes,no If you want to install the 4.5 FX (defaults to yes)], [], [with_profile4_5=yes])
|
||||
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
|
||||
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
|
||||
AC_ARG_WITH(monotouch_watch, [ --with-monotouch_watch=yes,no If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=no])
|
||||
AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
|
||||
|
||||
OPROFILE=no
|
||||
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
|
||||
@@ -3574,6 +3575,7 @@ if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
with_profile4_5=no
|
||||
with_monodroid=no
|
||||
with_monotouch=no
|
||||
with_monotouch_watch=no
|
||||
with_xammac=no
|
||||
fi
|
||||
|
||||
@@ -3596,6 +3598,7 @@ libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
|
||||
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
|
||||
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
@@ -4008,13 +4011,14 @@ echo "
|
||||
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
|
||||
|
||||
Libraries:
|
||||
.NET 4.5: $with_profile4_5
|
||||
MonoDroid: $with_monodroid
|
||||
MonoTouch: $with_monotouch
|
||||
Xamarin.Mac: $with_xammac
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
.NET 4.5: $with_profile4_5
|
||||
MonoDroid: $with_monodroid
|
||||
Xamarin.iOS: $with_monotouch
|
||||
Xamarin.WatchOS: $with_monotouch_watch
|
||||
Xamarin.Mac: $with_xammac
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
$disabled
|
||||
"
|
||||
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
|
||||
|
||||
@@ -144,7 +144,8 @@ public enum Lock {
|
||||
AssemblyBindingLock,
|
||||
MarshalLock,
|
||||
ClassesLock,
|
||||
LoaderGlobalDataLock
|
||||
LoaderGlobalDataLock,
|
||||
ThreadsLock,
|
||||
}
|
||||
|
||||
public class SimLock
|
||||
@@ -242,7 +243,24 @@ public class SimLock
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
return String.Format ("{0}", kind);
|
||||
switch (kind) {
|
||||
case Lock.LoaderLock:
|
||||
case Lock.IcallLock:
|
||||
case Lock.AssemblyBindingLock:
|
||||
case Lock.MarshalLock:
|
||||
case Lock.ClassesLock:
|
||||
case Lock.LoaderGlobalDataLock:
|
||||
case Lock.ThreadsLock:
|
||||
return String.Format ("{0}", kind);
|
||||
|
||||
case Lock.ImageDataLock:
|
||||
case Lock.DomainLock:
|
||||
case Lock.DomainAssembliesLock:
|
||||
case Lock.DomainJitCodeHashLock:
|
||||
return String.Format ("{0}[{1}]", kind, id);
|
||||
default:
|
||||
return String.Format ("Unknown({0})[{1}]", kind, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,6 +329,10 @@ public class Trace {
|
||||
"add_record",
|
||||
"mono_locks_lock_acquired",
|
||||
"mono_locks_lock_released",
|
||||
"mono_threads_lock",
|
||||
"mono_threads_unlock",
|
||||
"mono_domain_lock",
|
||||
"mono_domain_unlock",
|
||||
};
|
||||
|
||||
public Trace (string[] fields) {
|
||||
|
||||
Vendored
+1
-1
Submodule external/ikvm updated: dab43d5cf4...d6b00edf21.
Vendored
+1
-1
Submodule external/referencesource updated: 42504b8af5...626e7153cb.
@@ -183,11 +183,11 @@ Restrict the compiler to use only the features available in C# 3.0
|
||||
Restrict the compiler to use only the features available in C# 4.0
|
||||
specification.
|
||||
.TP
|
||||
.I "future"
|
||||
.I "experimental"
|
||||
Enables unstable features from upcoming versions of the language.
|
||||
.PP
|
||||
Notice that this flag only restricts the language features available to
|
||||
the programmer. A version of produced assemblies can be controled using
|
||||
the programmer. A version of produced assemblies can be controlled using
|
||||
.I SDK
|
||||
option.
|
||||
.ne
|
||||
|
||||
+6
-1
@@ -992,7 +992,12 @@ where V is the architecture number 4, 5, 6, 7 and the options can be currently b
|
||||
.TP
|
||||
\fBMONO_ARM_FORCE_SOFT_FLOAT\fR
|
||||
When Mono is built with a soft float fallback on ARM and this variable is set to
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is detected.
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is
|
||||
detected.
|
||||
.TP
|
||||
\fBMONO_DARWIN_WATCHER_MAXFDS\fR
|
||||
This is a debugging aid used to force limits on the FileSystemWatcher
|
||||
implementation in Darwin. There is no limit by default.
|
||||
.TP
|
||||
\fBMONO_DISABLE_AIO\fR
|
||||
If set, tells mono NOT to attempt using native asynchronous I/O services. In
|
||||
|
||||
@@ -337,6 +337,10 @@ version
|
||||
.IP \[bu] 2
|
||||
\f[I]thread\f[]: thread information
|
||||
.IP \[bu] 2
|
||||
\f[I]domain\f[]: app domain information
|
||||
.IP \[bu] 2
|
||||
\f[I]context\f[]: remoting context information
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot\f[]: live heap usage at heap shots
|
||||
.IP \[bu] 2
|
||||
\f[I]counters\f[]: counters samples
|
||||
|
||||
@@ -6,7 +6,7 @@ BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PA
|
||||
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
|
||||
|
||||
# Use system resgen as we don't want local System.Windows.Forms dependency
|
||||
RESGEN = resgen2
|
||||
RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
@@ -6,7 +6,7 @@ BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PA
|
||||
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
|
||||
|
||||
# Use system resgen as we don't want local System.Windows.Forms dependency
|
||||
RESGEN = resgen2
|
||||
RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
|
||||
|
||||
# nuttzing!
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PA
|
||||
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
|
||||
|
||||
# Use system resgen as we don't want local System.Windows.Forms dependency
|
||||
RESGEN = resgen2
|
||||
RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/makefile.build -crlf
|
||||
@@ -1,3 +0,0 @@
|
||||
/Web.config -crlf
|
||||
/Web.config.bak -crlf
|
||||
/makefile.build -crlf
|
||||
@@ -1 +0,0 @@
|
||||
/GlobalResource.resx -crlf
|
||||
-127
@@ -1,127 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="SearchMessage" xml:space="preserve">
|
||||
<value>Wildcard characters * and ? are permitted.</value>
|
||||
</data>
|
||||
<data name="WelcomeMessage" xml:space="preserve">
|
||||
<value>Welcome to the Web Site Administration Tool
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,7 +0,0 @@
|
||||
/CreateRole.aspx.resx -crlf
|
||||
/CreateUser.aspx.resx -crlf
|
||||
/Default.aspx.resx -crlf
|
||||
/EditUser.aspx.resx -crlf
|
||||
/ManageRole.aspx.resx -crlf
|
||||
/ManageUser.aspx.resx -crlf
|
||||
/Util.Master.resx -crlf
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CreateRoleText" xml:space="preserve">
|
||||
<value>You can optionally add roles, or groups, that enable you to allow or deny groups of users access to specific folders in your Web site. For example, you might create roles such as "managers," "sales," or "members," each with different access to specific folders. </value>
|
||||
</data>
|
||||
<data name="newrolelabel" xml:space="preserve">
|
||||
<value>Create New Role</value>
|
||||
</data>
|
||||
<data name="rolenamelabel" xml:space="preserve">
|
||||
<value>New role name: </value>
|
||||
</data>
|
||||
</root>
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ActiveUserLabel" xml:space="preserve">
|
||||
<value>Active User</value>
|
||||
</data>
|
||||
<data name="CreateUserText" xml:space="preserve">
|
||||
<value>Add a user by entering a user name, password, and e-mail address on this page.</value>
|
||||
</data>
|
||||
</root>
|
||||
-123
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="EnterText" xml:space="preserve">
|
||||
<value>You can use the Web Site Administration Tool to manage all the security settings for your application. You can set up users and passwords (authentication), create roles (groups of users), and create permissions (rules for controlling access to parts of your application).</value>
|
||||
</data>
|
||||
</root>
|
||||
-135
@@ -1,135 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="editUserText" xml:space="preserve">
|
||||
<value>Use this page to edit user information and to specify what roles a user belongs in. </value>
|
||||
</data>
|
||||
<data name="Rolelbl" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="Successlbl" xml:space="preserve">
|
||||
<value>You have successfully updated the user</value>
|
||||
</data>
|
||||
<data name="successUpdatelbl" xml:space="preserve">
|
||||
<value>You have successfully updated the user </value>
|
||||
</data>
|
||||
<data name="Userlbl" xml:space="preserve">
|
||||
<value>User</value>
|
||||
</data>
|
||||
</root>
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="menageRoleText" xml:space="preserve">
|
||||
<value>Use this page to manage the members in the specified role. To add a user to the role, search for the user name and then select the User Is In Role check box for that user. </value>
|
||||
</data>
|
||||
<data name="roleNameLabel" xml:space="preserve">
|
||||
<value>Role:</value>
|
||||
</data>
|
||||
<data name="searchBylbl" xml:space="preserve">
|
||||
<value>Search by :</value>
|
||||
</data>
|
||||
<data name="searchUserlbl" xml:space="preserve">
|
||||
<value>Search for Users</value>
|
||||
</data>
|
||||
</root>
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="manageUserText" xml:space="preserve">
|
||||
<value>Click Edit User to view or change the user's password or other properties. To assign roles to the selected user, select the appropriate check boxes on the right. To prevent users from logging in to your application while retaining their information in your database, set the status to inactive by clearing the check box.
|
||||
</value>
|
||||
</data>
|
||||
<data name="roleslbl" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="searchBylbl" xml:space="preserve">
|
||||
<value>Search by :</value>
|
||||
</data>
|
||||
<data name="searchUserlbl" xml:space="preserve">
|
||||
<value>Search for Users</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,5 +0,0 @@
|
||||
/Searcher.ascx -crlf
|
||||
/Searcher.ascx.cs -crlf
|
||||
/Searcher.ascx.cs.bak -crlf
|
||||
/Searcher.ascx.designer.cs -crlf
|
||||
/Searcher.ascx.designer.cs.bak -crlf
|
||||
@@ -1,34 +0,0 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" EnableTheming="false" CodeBehind="Searcher.ascx.cs" Inherits="Mainsoft.Web.AspnetConfig.Searcher" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Edit roles:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" >
|
||||
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
|
||||
ForeColor="#333333" GridLines="None" Width="100%">
|
||||
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Edit roles">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" Checked='<%# Bind("IsInRole") %>'
|
||||
OnCheckedChanged="Roles_Changed" Text='<%# Bind("Role") %>' />
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
Edit roles for user : <%# User %>
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
|
||||
<EditRowStyle BackColor="#999999" />
|
||||
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Searcher : System.Web.UI.UserControl
|
||||
{
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string)ViewState["User"];}
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
if (User == String.Empty || (Membership.GetUser(User)==null))
|
||||
{
|
||||
GridView1.DataSource = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridView1.DataSource = RolesDS.SelectUsersRole(User);
|
||||
}
|
||||
GridView1.DataBind();
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
protected void Roles_Changed(object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string)ViewState["User"];
|
||||
if (((CheckBox)sender).Checked)
|
||||
{
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.Administration
|
||||
{
|
||||
public partial class Searcher : System.Web.UI.UserControl
|
||||
{
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string)ViewState["User"];}
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
if (User == String.Empty || (Membership.GetUser(User)==null))
|
||||
{
|
||||
GridView1.DataSource = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridView1.DataSource = RolesDS.SelectUsersRole(User);
|
||||
}
|
||||
GridView1.DataBind();
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
protected void Roles_Changed(object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string)ViewState["User"];
|
||||
if (((CheckBox)sender).Checked)
|
||||
{
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Searcher {
|
||||
protected System.Web.UI.WebControls.GridView GridView1;
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.Administration {
|
||||
|
||||
public partial class Searcher {
|
||||
protected System.Web.UI.WebControls.GridView GridView1;
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{724CABEB-39E5-47A7-9F72-4B81FFC56760}</ProjectGuid>
|
||||
<ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>Mainsoft.Web.AspnetConfig</AssemblyName>
|
||||
<JDKName>1.6.0</JDKName>
|
||||
<GHProjectType>3</GHProjectType>
|
||||
<GHProjectKind>runtime</GHProjectKind>
|
||||
<Version>2.0</Version>
|
||||
<RootNamespace>Mainsoft.Web.AspnetConfig</RootNamespace>
|
||||
<jarserver>ipa</jarserver>
|
||||
<ApplicationServerType>tomcat</ApplicationServerType>
|
||||
<FlatWebApp>true</FlatWebApp>
|
||||
<DeployOnBuild>true</DeployOnBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;JAVA;TARGET_JVM</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<SkipValidation>True</SkipValidation>
|
||||
<KeepIntermediate>False</KeepIntermediate>
|
||||
<TargetPlatform>0</TargetPlatform>
|
||||
<AdditionalClassPath>
|
||||
</AdditionalClassPath>
|
||||
<PreCompile>True</PreCompile>
|
||||
<CompressionLevel>1</CompressionLevel>
|
||||
<DeploymentMethod>1</DeploymentMethod>
|
||||
<UseTestingPage>True</UseTestingPage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE;JAVA;TARGET_JVM</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<SkipValidation>True</SkipValidation>
|
||||
<KeepIntermediate>False</KeepIntermediate>
|
||||
<TargetPlatform>0</TargetPlatform>
|
||||
<AdditionalClassPath>
|
||||
</AdditionalClassPath>
|
||||
<PreCompile>true</PreCompile>
|
||||
<CompressionLevel>1</CompressionLevel>
|
||||
<DeploymentMethod>1</DeploymentMethod>
|
||||
<UseTestingPage>True</UseTestingPage>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
|
||||
<Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>2274</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties REFS-JarPath-mscorlib="..\..\..\..\..\..\lib\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\lib\System.jar" REFS-JarPath-system-data="..\..\..\..\..\..\lib\System.Data.jar" REFS-JarPath-system-web="..\..\..\..\..\..\lib\System.Web.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\lib\System.Xml.jar" REFS-JarPath-system-configuration="..\..\..\..\..\lib\System.Configuration.jar" REFS-JarPath-system-drawing="..\..\..\..\..\lib\System.Drawing.jar;..\..\..\..\..\lib\jai_imageio.jar;..\..\..\..\..\lib\jai_core.jar;..\..\..\..\..\lib\jai_codec.jar;..\..\..\..\..\lib\clibwrapper_jiio.jar;..\..\..\..\..\lib\mlibwrapper_jai.jar" REFS-JarPath-myfaces="" REFS-RefInfo-myfaces="repository:vmw:framework:2.0" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<Content Include="WEB-INF\web.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="myfaces" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="J2SE.Helpers">
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\lib\J2SE.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="aspnetconfig\CreateRole.aspx.cs">
|
||||
<DependentUpon>CreateRole.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateRole.aspx.designer.cs">
|
||||
<DependentUpon>CreateRole.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateUser.aspx.cs">
|
||||
<DependentUpon>CreateUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateUser.aspx.designer.cs">
|
||||
<DependentUpon>CreateUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\EditUser.aspx.cs">
|
||||
<DependentUpon>EditUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\EditUser.aspx.designer.cs">
|
||||
<DependentUpon>EditUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Error.aspx.cs">
|
||||
<DependentUpon>Error.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Error.aspx.designer.cs">
|
||||
<DependentUpon>Error.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\GridButton.cs" />
|
||||
<Compile Include="aspnetconfig\GridCheckBox.cs" />
|
||||
<Compile Include="aspnetconfig\HttpHandlersSectionHandler.cs" />
|
||||
<Compile Include="aspnetconfig\ManageRole.aspx.cs">
|
||||
<DependentUpon>ManageRole.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageRole.aspx.designer.cs">
|
||||
<DependentUpon>ManageRole.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageUser.aspx.cs">
|
||||
<DependentUpon>ManageUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageUser.aspx.designer.cs">
|
||||
<DependentUpon>ManageUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\RolesDS.cs" />
|
||||
<Compile Include="aspnetconfig\SecurError.aspx.cs">
|
||||
<DependentUpon>SecurError.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\SecurError.aspx.designer.cs">
|
||||
<DependentUpon>SecurError.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\StrUtils.cs" />
|
||||
<Compile Include="aspnetconfig\UrlUtils.cs" />
|
||||
<Compile Include="aspnetconfig\Util.Master.cs">
|
||||
<DependentUpon>Util.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Util.Master.designer.cs">
|
||||
<DependentUpon>Util.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\Searcher.ascx.cs">
|
||||
<DependentUpon>Searcher.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\Searcher.ascx.designer.cs">
|
||||
<DependentUpon>Searcher.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="aspnetconfig\CreateRole.aspx" />
|
||||
<None Include="aspnetconfig\CreateUser.aspx" />
|
||||
<None Include="aspnetconfig\Default.aspx" />
|
||||
<None Include="aspnetconfig\EditUser.aspx" />
|
||||
<None Include="aspnetconfig\Error.aspx" />
|
||||
<EmbeddedResource Include="aspnetconfig\Mainsoft.Web.AspnetConfig.css" />
|
||||
<None Include="aspnetconfig\ManageRole.aspx" />
|
||||
<None Include="aspnetconfig\ManageUser.aspx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="aspnetconfig\SecurError.aspx" />
|
||||
<Content Include="aspnetconfig\Util.Master" />
|
||||
<Content Include="WEB-INF\faces-config.xml" />
|
||||
<None Include="Controls\Searcher.ascx" />
|
||||
<None Include="nomd5" />
|
||||
<EmbeddedResource Include="resources\mainsoft.jpg" />
|
||||
<EmbeddedResource Include="resources\untitled.bmp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,2 +0,0 @@
|
||||
/AssemblyInfo.cs -crlf
|
||||
/AssemblyInfo.cs.bak -crlf
|
||||
@@ -1,43 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Mainsoft.Web.AspnetConfig")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Mainsoft.Web.AspnetConfig")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.resources.mainsoft.jpg", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.resources.untitled.bmp", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.aspnetconfig.Mainsoft.Web.AspnetConfig.css", "text/css")]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Mainsoft.Web.Administration")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Mainsoft.Web.Administration")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.resources.mainsoft.jpg", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.resources.untitled.bmp", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.aspnetconfig.Mainsoft.Web.Administration.css", "text/css")]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/faces-config.xml -crlf
|
||||
/web.xml -crlf
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE faces-config PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
|
||||
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
||||
|
||||
<faces-config>
|
||||
<application>
|
||||
|
||||
|
||||
<state-manager>Mainsoft.Web.Hosting.ServletFacesStateManager</state-manager>
|
||||
<view-handler>Mainsoft.Web.Hosting.ServletFacesViewHandler</view-handler>
|
||||
|
||||
</application>
|
||||
</faces-config>
|
||||
@@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"[]>
|
||||
<web-app>
|
||||
<display-name>Visual MainWin application</display-name>
|
||||
<description>Visual MainWin application.</description>
|
||||
<context-param>
|
||||
<param-name>EnableSessionPersistency</param-name>
|
||||
<param-value>False</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>WebFileSystemAccess</param-name>
|
||||
<param-value>Virtual</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
|
||||
<param-value>client</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.application.CONFIG_FILES</param-name>
|
||||
<param-value>/WEB-INF/faces-config.xml</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
||||
<param-value>.aspx</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
|
||||
</listener>
|
||||
<listener>
|
||||
<listener-class>system.Web.GH.SessionListener</listener-class>
|
||||
</listener>
|
||||
<servlet>
|
||||
<servlet-name>VmwIncludeHelperServlet</servlet-name>
|
||||
<servlet-class>system.Web.GH.IncludeHelperServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<servlet-class>GhDynamicHttpServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<servlet-class>GhStaticHttpServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.aspx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.asmx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.ashx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.invoke</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.soap</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.rem</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.axd</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwIncludeHelperServlet</servlet-name>
|
||||
<url-pattern>/servletincludehelper</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.gif</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.jpeg</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.jpg</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.png</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.html</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.htm</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.bmp</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.css</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.js</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.vbs</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.inc</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.swf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.htc</url-pattern>
|
||||
</servlet-mapping>
|
||||
<session-config>
|
||||
<session-timeout>20</session-timeout>
|
||||
</session-config>
|
||||
<welcome-file-list>
|
||||
<welcome-file>Default.aspx</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
|
||||
|
||||
<appSettings>
|
||||
|
||||
<!--
|
||||
***** Defaulf is False *****
|
||||
<add key="allowRemoteConfiguration" value="False" />-->
|
||||
</appSettings>
|
||||
<connectionStrings/>
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<roleManager enabled="true" />
|
||||
<compilation defaultLanguage="c#" debug="true"/>
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Forms" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
|
||||
|
||||
<appSettings>
|
||||
|
||||
<!--
|
||||
***** Defaulf is False *****
|
||||
<add key="allowRemoteConfiguration" value="False" />-->
|
||||
</appSettings>
|
||||
<connectionStrings/>
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<roleManager enabled="true" />
|
||||
<compilation defaultLanguage="c#" debug="true"/>
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Forms" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
|
||||
<siteMap>
|
||||
<providers>
|
||||
<add siteMapFile="web.sitemap" name="AspNetConfigXmlSiteMapProvider"
|
||||
type="Mainsoft.Web.Administration.CustomXmlSiteMapProvider" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -1,32 +0,0 @@
|
||||
/CreateRole.aspx -crlf
|
||||
/CreateRole.aspx.cs -crlf
|
||||
/CreateRole.aspx.designer.cs -crlf
|
||||
/CreateUser.aspx -crlf
|
||||
/CreateUser.aspx.cs -crlf
|
||||
/CreateUser.aspx.designer.cs -crlf
|
||||
/Default.aspx -crlf
|
||||
/Default.aspx.cs -crlf
|
||||
/Default.aspx.designer.cs -crlf
|
||||
/EditUser.aspx -crlf
|
||||
/EditUser.aspx.cs -crlf
|
||||
/EditUser.aspx.designer.cs -crlf
|
||||
/Error.aspx -crlf
|
||||
/Error.aspx.cs -crlf
|
||||
/Error.aspx.designer.cs -crlf
|
||||
/GridButton.cs -crlf
|
||||
/GridCheckBox.cs -crlf
|
||||
/Mainsoft.Web.AspnetConfig.css -crlf
|
||||
/ManageRole.aspx -crlf
|
||||
/ManageRole.aspx.cs -crlf
|
||||
/ManageRole.aspx.designer.cs -crlf
|
||||
/ManageUser.aspx -crlf
|
||||
/ManageUser.aspx.cs -crlf
|
||||
/ManageUser.aspx.designer.cs -crlf
|
||||
/RolesDS.cs -crlf
|
||||
/SecurError.aspx -crlf
|
||||
/SecurError.aspx.cs -crlf
|
||||
/SecurError.aspx.designer.cs -crlf
|
||||
/StrUtils.cs -crlf
|
||||
/Util.Master -crlf
|
||||
/Util.Master.cs -crlf
|
||||
/Util.Master.designer.cs -crlf
|
||||
@@ -1,125 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="CreateRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.CreateRole" %>
|
||||
<%@ Register TagPrefix="custom" Assembly="Mainsoft.Web.AspnetConfig" Namespace="Mainsoft.Web.AspnetConfig" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Create\Manage roles</td>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Main" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:MultiView runat="server" ID="mv" ActiveViewIndex="0">
|
||||
<asp:View runat="server" id="grid">
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
You can optionally add roles, or groups, that enable you to allow or deny groups of users access to specific folders in your Web site. For example, you might create roles such as "managers," "sales," or "members," each with different access to specific folders. <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Create New Role
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
New role name:
|
||||
<asp:TextBox ID="roleName_txb" runat="server" />
|
||||
<asp:Button ID="roleName_bt" runat="server" Text="Add role" OnClick="roleName_bt_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="error_lb" runat="server" ForeColor="Red" />
|
||||
<br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" datakeynames="Role;">
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" DataKeyNames="Role">
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Role" HeaderText="Role Name" >
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Add\Remove Role">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# string.Format("ManageRole.aspx?Role={0}", HttpUtility.UrlEncode((string)Eval("Role"))) %>'
|
||||
Text="Manage" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="grid_btn" runat="server" User='<%# Bind("Role") %>' OnClick="gridbtn_click" >Delete</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
|
||||
SelectMethod="Select" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Role" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
<asp:View runat="server" ID="yesno" >
|
||||
<table class="innertable" width="60%">
|
||||
<tr>
|
||||
<td style="height: 80px" valign="top">
|
||||
<br />
|
||||
<asp:Image runat="server" id="Img" />
|
||||
Are you sure you want to delete the role: "<%= Role %>"?
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" style="background-color:inactivecaptiontext" >
|
||||
<asp:Button ID="yes" runat="server" Text="Yes" style="width:50px" OnClick="Click_Yes" />
|
||||
<asp:Button ID="no" runat="server" Text="No" style="width:50px" OnClick="Click_No" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class CreateRole : System.Web.UI.Page
|
||||
{
|
||||
public string Role
|
||||
{
|
||||
get { return ViewState["Role"] == null ? String.Empty : (string) ViewState["Role"]; }
|
||||
set { ViewState["Role"] = value; }
|
||||
}
|
||||
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (mv.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
|
||||
base.OnPreRender (e);
|
||||
Roles_gv.DataBind ();
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
Img.ImageUrl = this.Page.ClientScript.GetWebResourceUrl (typeof (CreateRole), "Mainsoft.Web.AspnetConfig.resources.untitled.bmp");
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected void gridbtn_click (object sender, EventArgs e)
|
||||
{
|
||||
Role = ((GridButton) sender).User;
|
||||
mv.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void roleName_bt_Click (object sender, EventArgs e)
|
||||
{
|
||||
if (roleName_txb.Text != "") {
|
||||
try {
|
||||
Roles.CreateRole (roleName_txb.Text);
|
||||
error_lb.Text = "";
|
||||
}
|
||||
catch (Exception ex) {
|
||||
error_lb.Text = ex.Message;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
else {
|
||||
error_lb.Text = "Role name cannot be empty!";
|
||||
}
|
||||
}
|
||||
|
||||
protected void Click_No (object sender, EventArgs e)
|
||||
{
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Click_Yes (object sender, EventArgs e)
|
||||
{
|
||||
RolesDS.Delete (Role);
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class CreateRole {
|
||||
protected System.Web.UI.WebControls.MultiView mv;
|
||||
protected System.Web.UI.WebControls.View grid;
|
||||
protected System.Web.UI.WebControls.TextBox roleName_txb;
|
||||
protected System.Web.UI.WebControls.Button roleName_bt;
|
||||
protected System.Web.UI.WebControls.Label error_lb;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
protected System.Web.UI.WebControls.View yesno;
|
||||
protected System.Web.UI.WebControls.Image Img;
|
||||
protected System.Web.UI.WebControls.Button yes;
|
||||
protected System.Web.UI.WebControls.Button no;
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="CreateUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.CreateUser" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Create user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<table style="border-right: thin solid; padding-right: 2px; border-top: thin solid; padding-left: 2px; padding-bottom: 2px; border-left: thin solid; padding-top: 2px; border-bottom: thin solid">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
<asp:Label ID="text_lbl" runat="server" Text="Add a user by entering a user name, password, and e-mail address on this page." />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "60%" valign="top">
|
||||
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3"
|
||||
BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" LoginCreatedUser="false"
|
||||
Font-Size="0.8em" Width="353px" ContinueDestinationPageUrl="CreateUser.aspx" FinishDestinationPageUrl="CreateUser.aspx" EmailRegularExpression="\S+@\S+\.\S+">
|
||||
<WizardSteps>
|
||||
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
|
||||
<ContentTemplate>
|
||||
<table border="0" style="font-size: 100%; width: 353px; font-family: Verdana">
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d;
|
||||
text-align: left">
|
||||
Sign Up for Your New Account</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
|
||||
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
|
||||
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
|
||||
ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Email" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
|
||||
ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Question" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
|
||||
ErrorMessage="Security question is required." ToolTip="Security question is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Answer" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
|
||||
ErrorMessage="Security answer is required." ToolTip="Security answer is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
|
||||
ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
|
||||
ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<asp:RegularExpressionValidator ID="EmailRegExp" runat="server" ControlToValidate="Email"
|
||||
Display="Dynamic" ErrorMessage="Please enter a different e-mail." ValidationExpression="\S+@\S+\.\S+"
|
||||
ValidationGroup="CreateUserWizard1"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="color: red">
|
||||
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:CreateUserWizardStep>
|
||||
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
|
||||
<ContentTemplate>
|
||||
<table border="0" style="font-size: 100%; width: 353px; font-family: Verdana">
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d;
|
||||
text-align: left">
|
||||
Create User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<br />
|
||||
|
||||
Complete.<br />
|
||||
Your account has been successfully created.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<asp:Button ID="ContinueButton" runat="server" BackColor="#FFFBFF" BorderColor="#CCCCCC"
|
||||
BorderStyle="Solid" BorderWidth="1px" CausesValidation="False" CommandName="Continue"
|
||||
Font-Names="Verdana" ForeColor="#284775" Text="Continue" ValidationGroup="CreateUserWizard1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:CompleteWizardStep>
|
||||
</WizardSteps>
|
||||
<SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
|
||||
<TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
|
||||
<NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<StepStyle BorderWidth="0px" />
|
||||
</asp:CreateUserWizard>
|
||||
</td>
|
||||
<td width= "60%" valign="top">
|
||||
<table width="100%" style="background-color: #f7f6f3; border-right: #e6e2d8 1px solid; border-top: #e6e2d8 1px solid; border-left: #e6e2d8 1px solid; border-bottom: #e6e2d8 1px solid;" >
|
||||
<tr>
|
||||
<td width="100%" style="text-align: center; background-color: #5D7B9D; font-weight:bold; font-size:0.9em; color:White;text-align:center; height: 19px;">
|
||||
Roles
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<asp:CheckBoxList ID="roles_lst" runat="server">
|
||||
</asp:CheckBoxList></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Active User
|
||||
<asp:CheckBox ID="active_chb" runat="server" Checked="true" Enabled="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,85 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class CreateUser : System.Web.UI.Page
|
||||
{
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
roles_lst.DataBind ();
|
||||
base.OnPreRender (e);
|
||||
if (CreateUserWizard1.ActiveStepIndex != 0) {
|
||||
text_lbl.Visible = false;
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
active_chb.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack) {
|
||||
roles_lst.DataValueField = "Role";
|
||||
roles_lst.DataSource = RolesDS.Select ();
|
||||
}
|
||||
CreateUserWizard1.CreatingUser += new LoginCancelEventHandler (CreateUserWizard1_CreatingUser);
|
||||
CreateUserWizard1.CreatedUser += new EventHandler (CreateUserWizard1_CreatedUser);
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateUserWizard1_CreatedUser (object sender, EventArgs e)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (((CreateUserWizard) sender).UserName);
|
||||
roles_lst.Enabled = false;
|
||||
|
||||
int i = 0;
|
||||
while (i < roles_lst.Items.Count) {
|
||||
if (roles_lst.Items[i].Selected) {
|
||||
try {
|
||||
Roles.AddUserToRole (((CreateUserWizard) sender).UserName, roles_lst.Items[i].Text);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
((CreateUserWizard) sender).UnknownErrorMessage = ex.Message;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateUserWizard1_CreatingUser (object sender, LoginCancelEventArgs e)
|
||||
{
|
||||
((CreateUserWizard) sender).DisableCreatedUser = !active_chb.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class CreateUser {
|
||||
protected System.Web.UI.WebControls.Label text_lbl;
|
||||
protected System.Web.UI.WebControls.CreateUserWizard CreateUserWizard1;
|
||||
protected System.Web.UI.WebControls.CreateUserWizardStep CreateUserWizardStep1;
|
||||
protected System.Web.UI.WebControls.CompleteWizardStep CompleteWizardStep1;
|
||||
protected System.Web.UI.WebControls.CheckBoxList roles_lst;
|
||||
protected System.Web.UI.WebControls.CheckBox active_chb;
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="Default.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.Default" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td style="color: #333333">Home</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ContentPlaceHolderID="Main">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
You can use the Web Site Administration Tool to manage all the security settings for your application. You can set up users and passwords (authentication), and create roles (groups of users). By default, user information is stored in a Cloudscape database in the Data folder of your Web project. If you want to store user information in a different database, you may configure a different provider in the web.config file.
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="innertable" width="70%" >
|
||||
<tr>
|
||||
<td class="controlheader">
|
||||
Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= User_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="CreateUser.aspx" OnLoad="UsersLinks_Load">Create user</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="ManageUser.aspx" OnLoad="UsersLinks_Load">Manage users</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="innertable" width="70%">
|
||||
<tr>
|
||||
<td class="controlheader">
|
||||
Roles
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= Roles_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="CreateRole.aspx" OnLoad="HyperLink1_Load" >Create or manage roles</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,109 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
private bool IsPortalRoleProvider;
|
||||
private bool IsPortalMembershipProvider;
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
try {
|
||||
IsPortalRoleProvider = (Roles.Provider).GetType ().ToString () == "Mainsoft.Web.Security.WPGroupsRoleProvider";
|
||||
}
|
||||
catch{
|
||||
}
|
||||
IsPortalMembershipProvider = (Membership.Provider).GetType().ToString () == "Mainsoft.Web.Security.WPMembershipProvider";
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public string User_count
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPortalMembershipProvider) {
|
||||
return "You cannot create or manage users when WPMembershipProvider is configured as the default provider.";
|
||||
}
|
||||
else {
|
||||
MembershipUserCollection user_collection = Membership.GetAllUsers ();
|
||||
return "Created users :" + user_collection.Count.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Roles_count
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPortalRoleProvider) {
|
||||
return @"You cannot create or manage roles when WPGroupsRoleProvider is configured as the default provider.";
|
||||
}
|
||||
else if (Roles.Enabled) {
|
||||
string[] list = Roles.GetAllRoles ();
|
||||
return "Existing roles :" + list.Length.ToString ();
|
||||
}
|
||||
else
|
||||
return @"In order to create or manage roles, the roleManger key must be enabled. To enable roleManager, please modify your Web.config file as follows: <br />
|
||||
<configuration xmlns=""http://schemas.microsoft.com/.NetConfiguration/v2.0""> <br />
|
||||
<system.web> <br />
|
||||
<roleManager enabled=""true"" /> <br />
|
||||
</system.web> <br />
|
||||
</configuration>";
|
||||
}
|
||||
}
|
||||
|
||||
protected void HyperLink1_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (!Roles.Enabled || IsPortalRoleProvider)
|
||||
((HyperLink) sender).Visible = false;
|
||||
}
|
||||
|
||||
protected void UsersLinks_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (IsPortalMembershipProvider) {
|
||||
((HyperLink) sender).Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Default {
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink2;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink3;
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="EditUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.EditUser" %>
|
||||
<%@ Register TagPrefix="custom" TagName="searcher" Src="~/Controls/Searcher.ascx" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #284E98"><a class="SiteMap" href="ManageUser.aspx" title="Manage user" runat="server">Manage user</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Edit user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
|
||||
<asp:View ID="updateUser" runat="server" >
|
||||
<div>
|
||||
<table width="100%" class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Use this page to edit user information and to specify what roles a user belongs in.
|
||||
<br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="70%" class="innertable" align="left" valign="top">
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader" colspan="3">
|
||||
User
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
User ID:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="userid_txb" runat="server" Enabled="false" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-size: 20px; color: red">*</span> E-mail address:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="email_txb" runat="server"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="active_chb" runat="server" /> Active user
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Description:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="desc_txb" runat="server">[not set]</asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="save_bt" runat="server" Text="Save" OnClick="save_bt_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="innertable" valign="top" style="width: 82%" >
|
||||
<custom:searcher ID="srch" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
(<span style="font-size: 20px; color: red">*</span>)Required field <br /><br />
|
||||
<asp:RequiredFieldValidator ID="required_email_validator" runat="server" ControlToValidate="email_txb" ErrorMessage="Email required" />
|
||||
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="email_txb" ValidationExpression="\S+@\S+\.\S+" runat="server" ErrorMessage="Email format is invalid"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</asp:View>
|
||||
<asp:View ID="successupdate" runat="server">
|
||||
<div>
|
||||
<table width="100%" class="maintable">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
User Management
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" style="height: 100px" valign="top" align="left">
|
||||
You have successfully updated the user
|
||||
<asp:Label ID="name_lbl" runat="server" /> <br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" align="right">
|
||||
<asp:Button ID="success_btn" runat="server" Text="OK" OnClick="success_btn_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
@@ -1,96 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class EditUser : System.Web.UI.Page
|
||||
{
|
||||
String user_name;
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
user_name = Request.QueryString["User"];
|
||||
srch.User = user_name;
|
||||
if (!IsPostBack) {
|
||||
FillUserData (user_name);
|
||||
name_lbl.Text = user_name;
|
||||
}
|
||||
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "ManageUser.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (IsPostBack) {
|
||||
if (MultiView1.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
}
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
void FillUserData (string user_name)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
userid_txb.Text = user.UserName;
|
||||
email_txb.Text = user.Email;
|
||||
active_chb.Checked = user.IsApproved;
|
||||
desc_txb.Text = user.Comment;
|
||||
}
|
||||
|
||||
protected void roles_lst_DataBound (object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListItem item in ((CheckBoxList) sender).Items) {
|
||||
item.Selected = Boolean.Parse (item.Value);
|
||||
}
|
||||
}
|
||||
|
||||
protected void save_bt_Click (object sender, EventArgs e)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
user.IsApproved = active_chb.Checked;
|
||||
user.Email = email_txb.Text;
|
||||
user.Comment = desc_txb.Text;
|
||||
Membership.UpdateUser (user);
|
||||
MultiView1.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void success_btn_Click (object sender, EventArgs e)
|
||||
{
|
||||
Server.Transfer ("ManageUser.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class EditUser {
|
||||
protected System.Web.UI.WebControls.MultiView MultiView1;
|
||||
protected System.Web.UI.WebControls.View updateUser;
|
||||
protected System.Web.UI.WebControls.TextBox userid_txb;
|
||||
protected System.Web.UI.WebControls.TextBox email_txb;
|
||||
protected System.Web.UI.WebControls.CheckBox active_chb;
|
||||
protected System.Web.UI.WebControls.TextBox desc_txb;
|
||||
protected System.Web.UI.WebControls.Button save_bt;
|
||||
protected Mainsoft.Web.AspnetConfig.Searcher srch;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator required_email_validator;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator RegularExpressionValidator1;
|
||||
protected System.Web.UI.WebControls.View successupdate;
|
||||
protected System.Web.UI.WebControls.Label name_lbl;
|
||||
protected System.Web.UI.WebControls.Button success_btn;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Error.aspx.cs" Theme="" StylesheetTheme="" Inherits="Mainsoft.Web.AspnetConfig.Error" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="font-weight: bold; font-size: 20pt; color: red">
|
||||
Error occured on this request ! Please try again !
|
||||
</div>
|
||||
<div>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Default.aspx">Administration utility home page</asp:HyperLink>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Error : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Error {
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public class GridButton : LinkButton
|
||||
{
|
||||
[Bindable (true)]
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string) ViewState["User"]; }
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public class GridCheckBox : CheckBox
|
||||
{
|
||||
[Bindable (true)]
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string) ViewState["User"]; }
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
[Bindable (true)]
|
||||
public string Role
|
||||
{
|
||||
get { return ViewState["Role"] == null ? String.Empty : (string) ViewState["Role"]; }
|
||||
set { ViewState["Role"] = value; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-247
@@ -1,247 +0,0 @@
|
||||
//
|
||||
// System.Web.Configuration.HandlerFactoryConfiguration.cs
|
||||
//
|
||||
//
|
||||
// Authors:
|
||||
// Miguel de Icaza ([email protected])
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Web.Util;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System.Web.Configuration {
|
||||
|
||||
class FileMatchingInfo {
|
||||
public string MatchExact;
|
||||
public string MatchExpr;
|
||||
|
||||
// If set, we can fast-path the patch with string.EndsWith (FMI.EndsWith)
|
||||
public string EndsWith;
|
||||
public Regex RegExp;
|
||||
|
||||
public FileMatchingInfo (string s)
|
||||
{
|
||||
MatchExpr = s;
|
||||
|
||||
if (s[0] == '*' && (s.IndexOf ('*', 1) == -1))
|
||||
EndsWith = s.Substring (1);
|
||||
|
||||
if (s.IndexOf ('*') == -1)
|
||||
MatchExact = "/" + s;
|
||||
|
||||
if (MatchExpr != "*") {
|
||||
string expr = MatchExpr.Replace(".", "\\.").Replace("?", "\\?").Replace("*", ".*");
|
||||
if (expr.Length > 0 && expr [0] =='/')
|
||||
expr = expr.Substring (1);
|
||||
|
||||
expr += "\\z";
|
||||
RegExp = new Regex (expr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HttpHandler {
|
||||
// If `null', we are the "*" match
|
||||
public string OriginalVerb;
|
||||
public string OriginalPath;
|
||||
|
||||
public string [] Verbs;
|
||||
public FileMatchingInfo [] files;
|
||||
|
||||
// To support lazy loading we keep the name around.
|
||||
public string TypeName;
|
||||
Type type;
|
||||
|
||||
object instance;
|
||||
|
||||
public HttpHandler (string verb, string path, string typename, Type t)
|
||||
{
|
||||
OriginalVerb = verb;
|
||||
OriginalPath = path;
|
||||
|
||||
if (verb != "*")
|
||||
Verbs = verb.Split (',');
|
||||
string [] paths = path.Split (',');
|
||||
files = new FileMatchingInfo [paths.Length];
|
||||
|
||||
int i = 0;
|
||||
foreach (string s in paths)
|
||||
files [i++] = new FileMatchingInfo (s);
|
||||
|
||||
this.TypeName = typename;
|
||||
type = t;
|
||||
}
|
||||
|
||||
//
|
||||
// Loads the a type by name and verifies that it implements
|
||||
// IHttpHandler or IHttpHandlerFactory
|
||||
//
|
||||
public static Type LoadType (string type_name)
|
||||
{
|
||||
Type t;
|
||||
|
||||
try {
|
||||
t = Type.GetType (type_name, true);
|
||||
} catch (Exception e) {
|
||||
throw new HttpException (String.Format ("Failed to load httpHandler type `{0}'", type_name));
|
||||
}
|
||||
|
||||
if (typeof (IHttpHandler).IsAssignableFrom (t) ||
|
||||
typeof (IHttpHandlerFactory).IsAssignableFrom (t))
|
||||
return t;
|
||||
|
||||
throw new HttpException (String.Format ("Type {0} does not implement IHttpHandler or IHttpHandlerFactory", type_name));
|
||||
}
|
||||
|
||||
public bool PathMatches (string p)
|
||||
{
|
||||
int slash = p.LastIndexOf ('/');
|
||||
string orig = p;
|
||||
if (slash != -1)
|
||||
p = p.Substring (slash);
|
||||
|
||||
for (int j = files.Length; j > 0; ){
|
||||
j--;
|
||||
FileMatchingInfo fm = files [j];
|
||||
|
||||
if (fm.MatchExact != null)
|
||||
return fm.MatchExact.Length == p.Length && StrUtils.EndsWith (p, fm.MatchExact);
|
||||
|
||||
if (fm.EndsWith != null)
|
||||
return StrUtils.EndsWith (p, fm.EndsWith);
|
||||
|
||||
if (fm.MatchExpr == "*")
|
||||
return true;
|
||||
|
||||
/* convert to regexp */
|
||||
return fm.RegExp.IsMatch (orig);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Loads the handler, possibly delay-loaded.
|
||||
public object GetHandlerInstance ()
|
||||
{
|
||||
IHttpHandler ihh = instance as IHttpHandler;
|
||||
|
||||
if (instance == null || (ihh != null && !ihh.IsReusable)){
|
||||
if (type == null)
|
||||
type = LoadType (TypeName);
|
||||
|
||||
instance = Activator.CreateInstance (type);
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
class HandlerFactoryConfiguration {
|
||||
ArrayList handlers;
|
||||
HandlerFactoryConfiguration parent;
|
||||
int parent_items;
|
||||
|
||||
public HandlerFactoryConfiguration (HandlerFactoryConfiguration parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
|
||||
if (parent != null) {
|
||||
handlers = new ArrayList (parent.handlers);
|
||||
parent_items = handlers.Count;
|
||||
} else {
|
||||
handlers = new ArrayList ();
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
handlers.Clear ();
|
||||
}
|
||||
|
||||
public void Add (string verb, string path, string type_name, bool validate)
|
||||
{
|
||||
Type type;
|
||||
|
||||
if (validate){
|
||||
type = HttpHandler.LoadType (type_name);
|
||||
if (type == null)
|
||||
throw new HttpException (String.Format ("Can not load {0}", type_name));
|
||||
} else
|
||||
type = null;
|
||||
|
||||
handlers.Add (new HttpHandler (verb, path, type_name, type));
|
||||
}
|
||||
|
||||
public bool Remove (string verb, string path)
|
||||
{
|
||||
for (int i = handlers.Count - 1; i >= 0; i--) {
|
||||
HttpHandler handler = (HttpHandler) handlers [i];
|
||||
|
||||
if (verb == handler.OriginalVerb && path == handler.OriginalPath){
|
||||
handlers.RemoveAt (i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public object LocateHandler (string verb, string filepath)
|
||||
{
|
||||
int start, end;
|
||||
int count = handlers.Count;
|
||||
for (int k = 0; k < 2; k++) {
|
||||
// First iteration searches for the mapping in the items added to this
|
||||
// instance. The second one searches through the parent items if any.
|
||||
start = (k == 0) ? parent_items : 0;
|
||||
end = (k == 0) ? count : parent_items;
|
||||
for (int i = start; i < end; i++) {
|
||||
HttpHandler handler = (HttpHandler) handlers [i];
|
||||
|
||||
if (handler.Verbs == null){
|
||||
if (handler.PathMatches (filepath))
|
||||
return handler.GetHandlerInstance ();
|
||||
continue;
|
||||
}
|
||||
|
||||
string [] verbs = handler.Verbs;
|
||||
for (int j = verbs.Length; j > 0; ){
|
||||
j--;
|
||||
if (verbs [j] != verb)
|
||||
continue;
|
||||
if (handler.PathMatches (filepath))
|
||||
return handler.GetHandlerInstance ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// System.Web.Configuration.HttpHandlersSectionHandler
|
||||
//
|
||||
// Authors:
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc (http://www.ximian.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Xml;
|
||||
using System.Globalization;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Configuration
|
||||
{
|
||||
|
||||
|
||||
internal class HandlersUtil
|
||||
{
|
||||
private HandlersUtil ()
|
||||
{
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node)
|
||||
{
|
||||
return ExtractAttributeValue (attKey, node, false);
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional)
|
||||
{
|
||||
return ExtractAttributeValue (attKey, node, optional, false);
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional,
|
||||
bool allowEmpty)
|
||||
{
|
||||
if (node.Attributes == null) {
|
||||
if (optional)
|
||||
return null;
|
||||
|
||||
ThrowException ("Required attribute not found: " + attKey, node);
|
||||
}
|
||||
|
||||
XmlNode att = node.Attributes.RemoveNamedItem (attKey);
|
||||
if (att == null) {
|
||||
if (optional)
|
||||
return null;
|
||||
ThrowException ("Required attribute not found: " + attKey, node);
|
||||
}
|
||||
|
||||
string value = att.Value;
|
||||
if (!allowEmpty && value == String.Empty) {
|
||||
string opt = optional ? "Optional" : "Required";
|
||||
ThrowException (opt + " attribute is empty: " + attKey, node);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static internal void ThrowException (string msg, XmlNode node)
|
||||
{
|
||||
if (node != null && node.Name != String.Empty)
|
||||
msg = msg + " (node name: " + node.Name + ") ";
|
||||
throw new ConfigurationException (msg, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
|
||||
.appHeader
|
||||
{
|
||||
background-image: url(Images/mainsoft.jpg);
|
||||
background-repeat :no-repeat;
|
||||
height: 139px;
|
||||
width: 100%;
|
||||
border-bottom: 1 solid #7daad4;
|
||||
background-color:White;
|
||||
width: 100%;
|
||||
height: 133px;
|
||||
}
|
||||
|
||||
.controlheader {
|
||||
text-align: center;
|
||||
background-color: #5D7B9D;
|
||||
font-weight:bold;
|
||||
font-size:0.9em;
|
||||
color:White;
|
||||
text-align:center;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
border-right: thin solid;
|
||||
padding-right: 2px;
|
||||
border-top: thin solid;
|
||||
padding-left: 2px;
|
||||
padding-bottom: 2px;
|
||||
border-left: thin solid;
|
||||
padding-top: 2px;
|
||||
border-bottom: thin solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.innertable
|
||||
{
|
||||
background-color: #f7f6f3;
|
||||
border-right: #e6e2d8 1px solid;
|
||||
border-top: #e6e2d8 1px solid;
|
||||
border-left: #e6e2d8 1px solid;
|
||||
border-bottom: #e6e2d8 1px solid;
|
||||
}
|
||||
|
||||
.h1{
|
||||
font-size: 25px;
|
||||
vertical-align: middle;
|
||||
color: #6699ff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bordredtable
|
||||
{
|
||||
border-right: #6699ff 5px solid;
|
||||
padding-right: 40px;
|
||||
border-top: #6699ff 5px solid;
|
||||
padding-left: 40px;
|
||||
padding-bottom: 40px;
|
||||
border-left: #6699ff 5px solid;
|
||||
padding-top: 40px;
|
||||
border-bottom: #6699ff 5px solid;
|
||||
width: 90%;
|
||||
height: 500px;
|
||||
margin:5%;
|
||||
}
|
||||
|
||||
|
||||
BODY,TABLE,TR,TD
|
||||
{
|
||||
font-family: Arial;
|
||||
font-size: 11pt;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="ManageRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.MenageRole" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #284E98;"><a class="SiteMap" href="CreateRole.aspx" title="Create\Manage roles" runat="server">Create\Manage roles</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Manage roles</td>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Use this page to manage the members in the specified role. To add a user to the role, search for the user name and then select the User Is In Role check box for that user.
|
||||
<br />
|
||||
Role:
|
||||
<asp:Label ID="role_lbl" runat="server" /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Search for Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Search for Users
|
||||
<asp:DropDownList ID="searchBy_dl" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Name">User Name</asp:ListItem>
|
||||
<asp:ListItem Value="Mail">E-Mail</asp:ListItem>
|
||||
</asp:DropDownList> <asp:TextBox ID="user_txt" runat="server"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="searchUser_bt" runat="server" Text="Search" /> <br />
|
||||
Wildcard characters * and ? are permitted. <br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" datakeynames="Role;">
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" AllowPaging="True" PageSize="5">
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="User" HeaderText="User Name" />
|
||||
<asp:TemplateField HeaderText="User Is In Role">
|
||||
<ItemTemplate>
|
||||
<custom:GridCheckBox ID="Check" runat="server" AutoPostBack="true" Checked='<%# Bind("InRole") %>'
|
||||
User='<%# Bind("User") %>' OnCheckedChanged="CheckBox_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Left" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
|
||||
SelectMethod="CreateManageRoleTable" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Role" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="role" QueryStringField="Role" Type="String" />
|
||||
<asp:ControlParameter ControlID="user_txt" Name="searchtag" PropertyName="Text"
|
||||
Type="String" DefaultValue="""" />
|
||||
<asp:ControlParameter ControlID="searchBy_dl" Name="searchby" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,76 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class MenageRole : System.Web.UI.Page
|
||||
{
|
||||
String role;
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
role = Request.QueryString["Role"];
|
||||
if (!Roles.RoleExists (role)) {
|
||||
Server.Transfer ("Error.aspx");
|
||||
}
|
||||
role_lbl.Text = role;
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "CreateRole.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
Roles_gv.DataBind ();
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
public void CheckBox_CheckedChanged (object sender, EventArgs e)
|
||||
{
|
||||
string user = ((GridCheckBox) sender).User;
|
||||
if (((GridCheckBox) sender).Checked) {
|
||||
try {
|
||||
Roles.AddUserToRole (user, role);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user, role);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class MenageRole {
|
||||
protected System.Web.UI.WebControls.Label role_lbl;
|
||||
protected System.Web.UI.WebControls.DropDownList searchBy_dl;
|
||||
protected System.Web.UI.WebControls.TextBox user_txt;
|
||||
protected System.Web.UI.WebControls.Button searchUser_bt;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="ManageUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.ManageUser" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
<%@ Register TagPrefix="custom" TagName="searcher" Src="~/Controls/Searcher.ascx" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Manage user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<asp:MultiView ID="mv" ActiveViewIndex="0" runat="server">
|
||||
<asp:View ID="manage" runat="server" >
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Click Edit User to view or change the user's password or other properties. To assign roles to the selected user, select the appropriate check boxes on the right. To prevent users from logging in to your application while retaining their information in your database, set the status to inactive by clearing the check box.
|
||||
<br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" style="height: 360px">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" colspan="2" class="controlheader">
|
||||
Search for Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Search by :
|
||||
<asp:DropDownList ID="searchBy_lbx" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Name">User Name</asp:ListItem>
|
||||
<asp:ListItem Value="Mail">E-Mail</asp:ListItem>
|
||||
</asp:DropDownList> <asp:TextBox ID="user_txt" runat="server"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="searchUser_bt" runat="server" Text="Search" /> <br />
|
||||
Wildcard characters * and ? are permitted. <br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "70%" valign="top" >
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" AllowPaging="True" PageSize="5" DataKeyNames="User" >
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Active">
|
||||
<ItemTemplate>
|
||||
<custom:GridCheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Active") %>' AutoPostBack="true"
|
||||
OnCheckedChanged="CheckBox_CheckedChanged" User='<%# Bind("User") %>' />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="User" HeaderText="User Name" >
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl='<%# string.Format("EditUser.aspx?User={0}", HttpUtility.UrlEncode((string)Eval("User"))) %>'
|
||||
Text="Edit User" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="GridButton1" runat="server" User='<%# Bind("User") %>' OnClick="Delete_Click" >Delete User</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="grid_btn" runat="server" User='<%# Bind("User") %>' OnClick="gridbtn_click" OnLoad="gridbtn_load">Edit roles</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteUser"
|
||||
SelectMethod="SelectUser" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="User" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="user_txt" DefaultValue="""" Name="searchtag"
|
||||
PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="searchBy_lbx" DefaultValue="" Name="searchby" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
<td width="30%" valign="top">
|
||||
<custom:Searcher ID="srch" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="CreateUser.aspx">Create new user</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
<asp:View ID="quest" runat="server">
|
||||
<table class="innertable" width="60%">
|
||||
<tr>
|
||||
<td style="height: 80px" valign="top">
|
||||
<br />
|
||||
<asp:Image runat="server" ID="Img" />
|
||||
Are you sure you want to delete the user: "<%= User_name %>"? <br />
|
||||
All information for this user will be deleted, including the user name, the user's membership in roles, and any profile property values associated with this user.
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" style="background-color:inactivecaptiontext" >
|
||||
<asp:Button ID="yes" runat="server" Text="Yes" style="width:50px" OnClick="Click_Yes" />
|
||||
<asp:Button ID="no" runat="server" Text="No" style="width:50px" OnClick="Click_No" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
@@ -1,138 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class ManageUser : System.Web.UI.Page
|
||||
{
|
||||
public string User_name
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string) ViewState["User"]; }
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
Img.ImageUrl = this.Page.ClientScript.GetWebResourceUrl (typeof (ManageUser), "Mainsoft.Web.AspnetConfig.resources.untitled.bmp");
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (IsPostBack) {
|
||||
Roles_gv.DataBind ();
|
||||
if (mv.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
}
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
public void CheckBox_CheckedChanged (object sender, EventArgs e)
|
||||
{
|
||||
string user_name = ((GridCheckBox) sender).User;
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
if (((GridCheckBox) sender).Checked) {
|
||||
user.IsApproved = true;
|
||||
Membership.UpdateUser (user);
|
||||
}
|
||||
else {
|
||||
user.IsApproved = false;
|
||||
Membership.UpdateUser (user);
|
||||
}
|
||||
}
|
||||
|
||||
protected void gridbtn_click (object sender, EventArgs e)
|
||||
{
|
||||
srch.User = ((GridButton) sender).User;
|
||||
}
|
||||
|
||||
protected void Roles_Changed (object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string) ViewState["User_name"];
|
||||
if (((CheckBox) sender).Checked) {
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Click_No (object sender, EventArgs e)
|
||||
{
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Click_Yes (object sender, EventArgs e)
|
||||
{
|
||||
RolesDS.DeleteUser (User_name);
|
||||
//Roles_gv.DataBind ();
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Delete_Click (object sender, EventArgs e)
|
||||
{
|
||||
User_name = ((GridButton) sender).User;
|
||||
mv.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void gridbtn_load (object sender, EventArgs e)
|
||||
{
|
||||
if (!Roles.Enabled) {
|
||||
((GridButton)sender).Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class ManageUser {
|
||||
protected System.Web.UI.WebControls.MultiView mv;
|
||||
protected System.Web.UI.WebControls.View manage;
|
||||
protected System.Web.UI.WebControls.DropDownList searchBy_lbx;
|
||||
protected System.Web.UI.WebControls.TextBox user_txt;
|
||||
protected System.Web.UI.WebControls.Button searchUser_bt;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
protected Mainsoft.Web.AspnetConfig.Searcher srch;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
protected System.Web.UI.WebControls.View quest;
|
||||
protected System.Web.UI.WebControls.Image Img;
|
||||
protected System.Web.UI.WebControls.Button yes;
|
||||
protected System.Web.UI.WebControls.Button no;
|
||||
}
|
||||
}
|
||||
@@ -1,301 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public class RolesDS
|
||||
{
|
||||
public static DataTable Select()
|
||||
{
|
||||
return CreateDataTable();
|
||||
}
|
||||
|
||||
public static DataTable SelectUser()
|
||||
{
|
||||
return CreateUserDataTable();
|
||||
}
|
||||
|
||||
public static DataTable SelectUser(string searchtag, string searchby)
|
||||
{
|
||||
return CreateUserDataTable(searchtag, searchby);
|
||||
}
|
||||
|
||||
public static DataTable SelectUsersRole(string user)
|
||||
{
|
||||
return CreateUsersRoles(user);
|
||||
}
|
||||
|
||||
public static DataTable CreateUsersRoles(string user)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
|
||||
// Create User Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "Role";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "IsInRole";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
if (Roles.Enabled) {
|
||||
// Create rows to the table
|
||||
foreach (String role in Roles.GetAllRoles ()) {
|
||||
dtRow = aTable.NewRow ();
|
||||
dtRow["Role"] = role;
|
||||
dtRow["IsInRole"] = Roles.IsUserInRole (user, role);
|
||||
aTable.Rows.Add (dtRow);
|
||||
}
|
||||
}
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["Role"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable Delete(string Role)
|
||||
{
|
||||
if (Roles.RoleExists(Role))
|
||||
{
|
||||
Roles.DeleteRole(Role,false);
|
||||
}
|
||||
return Select();
|
||||
}
|
||||
|
||||
public static DataTable DeleteUser(string User)
|
||||
{
|
||||
Membership.DeleteUser(User, true);
|
||||
return SelectUser();
|
||||
}
|
||||
|
||||
public static DataTable CreateUserDataTable()
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create User Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "Active";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
// Create rows to the table
|
||||
foreach (MembershipUser user in Membership.GetAllUsers())
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateUserDataTable(string searchtag, string searchby)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "Active";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
string text = searchtag;
|
||||
text = text.Replace("*", "%");
|
||||
text = text.Replace("?", "_");
|
||||
|
||||
if (text.Trim() == "\"\"")
|
||||
text = "%";
|
||||
|
||||
if (searchby == "Name")
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByName(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
else // Mail
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByEmail(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateDataTable()
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "Role";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.Caption = "Role Name";
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = false;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
if (Roles.Enabled) {
|
||||
// Create rows to the table
|
||||
foreach (string str in Roles.GetAllRoles ()) {
|
||||
dtRow = aTable.NewRow ();
|
||||
dtRow["Role"] = str;
|
||||
aTable.Rows.Add (dtRow);
|
||||
}
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["Role"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateManageRoleTable(string role, string searchtag, string searchby)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create UserName column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.Caption = "User Name";
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
// Create User in role bool column and add to the table
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "InRole";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.Caption = "User Is In Role";
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
string text = searchtag;
|
||||
text = text.Replace("*", "%");
|
||||
text = text.Replace("?", "_");
|
||||
|
||||
if (text.Trim() == "\"\"")
|
||||
text = "%";
|
||||
|
||||
if (searchby == "Name")
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByName(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
if (Roles.Enabled) {
|
||||
dtRow["InRole"] = Roles.IsUserInRole (user.UserName, role);
|
||||
}
|
||||
else {
|
||||
dtRow["InRole"] = false;
|
||||
}
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
else // Mail
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByEmail(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
if (Roles.Enabled) {
|
||||
dtRow["InRole"] = Roles.IsUserInRole (user.UserName, role);
|
||||
}
|
||||
else {
|
||||
dtRow["InRole"] = false;
|
||||
}
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Theme="" StylesheetTheme="" CodeBehind="SecurError.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.SecurError" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="font-weight: bold; font-size: 11pt;">
|
||||
By default, the Web Site Administration Tool may only be accessed locally.
|
||||
To enable accessing it from a remote computer, open the Web.config file, add the key <br />
|
||||
allowRemoteConfiguration to the appSettings section, and set its value to true: <br />
|
||||
<pre>
|
||||
< appSettings >
|
||||
</ add key="allowRemoteConfiguration" value="True" />
|
||||
</ appSettings >
|
||||
</pre>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class SecurError : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class SecurError {
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// System.Web.Util.StrUtils
|
||||
//
|
||||
// Author(s):
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2005 Novell, Inc, (http://www.novell.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace Mainsoft.Web.Util
|
||||
{
|
||||
internal sealed class StrUtils {
|
||||
static CultureInfo invariant = CultureInfo.InvariantCulture;
|
||||
private StrUtils () { }
|
||||
|
||||
public static bool StartsWith (string str1, string str2)
|
||||
{
|
||||
return StartsWith (str1, str2, false);
|
||||
}
|
||||
|
||||
public static bool StartsWith (string str1, string str2, bool ignore_case)
|
||||
{
|
||||
int l2 = str2.Length;
|
||||
if (l2 == 0)
|
||||
return true;
|
||||
|
||||
int l1 = str1.Length;
|
||||
if (l2 > l1)
|
||||
return false;
|
||||
|
||||
return (0 == String.Compare (str1, 0, str2, 0, l2, ignore_case, invariant));
|
||||
}
|
||||
|
||||
public static bool EndsWith (string str1, string str2)
|
||||
{
|
||||
return EndsWith (str1, str2, false);
|
||||
}
|
||||
|
||||
public static bool EndsWith (string str1, string str2, bool ignore_case)
|
||||
{
|
||||
int l2 = str2.Length;
|
||||
if (l2 == 0)
|
||||
return true;
|
||||
|
||||
int l1 = str1.Length;
|
||||
if (l2 > l1)
|
||||
return false;
|
||||
|
||||
return (0 == String.Compare (str1, l1 - l2, str2, 0, l2, ignore_case, invariant));
|
||||
}
|
||||
|
||||
public static string EscapeQuotesAndBackslashes (string attributeValue)
|
||||
{
|
||||
StringBuilder sb = null;
|
||||
for (int i = 0; i < attributeValue.Length; i++) {
|
||||
char ch = attributeValue [i];
|
||||
if (ch == '\'' || ch == '"' || ch == '\\') {
|
||||
if (sb == null) {
|
||||
sb = new StringBuilder ();
|
||||
sb.Append (attributeValue.Substring (0, i));
|
||||
}
|
||||
sb.Append ('\\');
|
||||
sb.Append (ch);
|
||||
}
|
||||
else {
|
||||
if (sb != null)
|
||||
sb.Append (ch);
|
||||
}
|
||||
}
|
||||
if (sb != null)
|
||||
return sb.ToString ();
|
||||
return attributeValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
//
|
||||
// System.Web.UrlUtils.cs
|
||||
//
|
||||
// Authors:
|
||||
// Gonzalo Paniagua ([email protected])
|
||||
// Jackson Harper ([email protected])
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Web.SessionState;
|
||||
using System.Web;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Util {
|
||||
|
||||
internal class UrlUtils {
|
||||
|
||||
// appRoot + SessionID + vpath
|
||||
internal static string InsertSessionId (string id, string path)
|
||||
{
|
||||
string dir = GetDirectory (path);
|
||||
if (!dir.EndsWith ("/"))
|
||||
dir += "/";
|
||||
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (!appvpath.EndsWith ("/"))
|
||||
appvpath += "/";
|
||||
|
||||
if (path.StartsWith (appvpath))
|
||||
path = path.Substring (appvpath.Length);
|
||||
|
||||
if (path [0] == '/')
|
||||
path = path.Length > 1 ? path.Substring (1) : "";
|
||||
|
||||
return Canonic (appvpath + "(" + id + ")/" + path);
|
||||
}
|
||||
#if false
|
||||
internal static string GetSessionId (string path)
|
||||
{
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (path.Length <= appvpath.Length)
|
||||
return null;
|
||||
|
||||
path = path.Substring (appvpath.Length);
|
||||
if (path.Length == 0 || path [0] != '/')
|
||||
path = '/' + path;
|
||||
|
||||
int len = path.Length;
|
||||
if ((len < SessionId.IdLength + 3) || (path [1] != '(') ||
|
||||
(path [SessionId.IdLength + 2] != ')'))
|
||||
return null;
|
||||
|
||||
return path.Substring (2, SessionId.IdLength);
|
||||
}
|
||||
#endif
|
||||
internal static string RemoveSessionId (string base_path, string file_path)
|
||||
{
|
||||
// Caller did a GetSessionId first
|
||||
int idx = base_path.IndexOf ("/(");
|
||||
string dir = base_path.Substring (0, idx + 1);
|
||||
if (!dir.EndsWith ("/"))
|
||||
dir += "/";
|
||||
|
||||
idx = base_path.IndexOf (")/");
|
||||
if (idx != -1 && base_path.Length > idx + 2) {
|
||||
string dir2 = base_path.Substring (idx + 2);
|
||||
if (!dir2.EndsWith ("/"))
|
||||
dir2 += "/";
|
||||
|
||||
dir += dir2;
|
||||
}
|
||||
|
||||
return Canonic (dir + GetFile (file_path));
|
||||
}
|
||||
|
||||
public static string Combine (string basePath, string relPath)
|
||||
{
|
||||
if (relPath == null)
|
||||
throw new ArgumentNullException ("relPath");
|
||||
|
||||
int rlength = relPath.Length;
|
||||
if (rlength == 0)
|
||||
return "";
|
||||
|
||||
relPath = relPath.Replace ("\\", "/");
|
||||
if (IsRooted (relPath))
|
||||
return Canonic (relPath);
|
||||
|
||||
char first = relPath [0];
|
||||
if (rlength < 3 || first == '~' || first == '/' || first == '\\') {
|
||||
if (basePath == null || (basePath.Length == 1 && basePath [0] == '/'))
|
||||
basePath = String.Empty;
|
||||
|
||||
string slash = (first == '/') ? "" : "/";
|
||||
if (first == '~') {
|
||||
if (rlength == 1) {
|
||||
relPath = "";
|
||||
} else if (rlength > 1 && relPath [1] == '/') {
|
||||
relPath = relPath.Substring (2);
|
||||
slash = "/";
|
||||
}
|
||||
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (appvpath.EndsWith ("/"))
|
||||
slash = "";
|
||||
|
||||
return Canonic (appvpath + slash + relPath);
|
||||
}
|
||||
|
||||
return Canonic (basePath + slash + relPath);
|
||||
}
|
||||
|
||||
if (basePath == null || basePath == "" || basePath [0] == '~')
|
||||
basePath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
if (basePath.Length <= 1)
|
||||
basePath = String.Empty;
|
||||
|
||||
return Canonic (basePath + "/" + relPath);
|
||||
}
|
||||
|
||||
static char [] path_sep = {'\\', '/'};
|
||||
|
||||
internal static string Canonic (string path)
|
||||
{
|
||||
string [] parts = path.Split (path_sep);
|
||||
int end = parts.Length;
|
||||
|
||||
int dest = 0;
|
||||
|
||||
for (int i = 0; i < end; i++) {
|
||||
string current = parts [i];
|
||||
if (current == "." )
|
||||
continue;
|
||||
|
||||
if (current == "..") {
|
||||
if (dest == 0) {
|
||||
if (i == 1) // see bug 52599
|
||||
continue;
|
||||
|
||||
throw new HttpException ("Invalid path.");
|
||||
}
|
||||
|
||||
dest --;
|
||||
continue;
|
||||
}
|
||||
|
||||
parts [dest++] = current;
|
||||
}
|
||||
|
||||
if (dest == 0)
|
||||
return "/";
|
||||
|
||||
return String.Join ("/", parts, 0, dest);
|
||||
}
|
||||
|
||||
internal static string GetDirectory (string url)
|
||||
{
|
||||
url = url.Replace('\\','/');
|
||||
int last = url.LastIndexOf ('/');
|
||||
|
||||
if (last > 0) {
|
||||
return RemoveDoubleSlashes (url.Substring (0, last));
|
||||
}
|
||||
|
||||
return "/";
|
||||
}
|
||||
|
||||
internal static string RemoveDoubleSlashes (string input)
|
||||
{
|
||||
// MS VirtualPathUtility removes duplicate '/'
|
||||
string str = input;
|
||||
string x;
|
||||
while ((x = str.Replace ("//", "/")) != str) {
|
||||
str = x;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
internal static string GetFile (string url)
|
||||
{
|
||||
url = url.Replace('\\','/');
|
||||
int last = url.LastIndexOf ('/');
|
||||
if (last >= 0) {
|
||||
if (url.Length == 1) // Empty file name instead of ArgumentOutOfRange
|
||||
return "";
|
||||
return url.Substring (last+1);
|
||||
}
|
||||
|
||||
throw new Exception (String.Format ("GetFile: `{0}' does not contain a /", url));
|
||||
}
|
||||
|
||||
internal static bool IsRooted (string path)
|
||||
{
|
||||
if (path == null || path == "")
|
||||
return true;
|
||||
|
||||
char c = path [0];
|
||||
if (c == '/' || c == '\\')
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool IsRelativeUrl (string path)
|
||||
{
|
||||
return (path [0] != '/' && path.IndexOf (':') == -1);
|
||||
}
|
||||
|
||||
public static string ResolveVirtualPathFromAppAbsolute (string path)
|
||||
{
|
||||
if (path [0] != '~') return path;
|
||||
|
||||
if (path.Length == 1)
|
||||
return HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
if (path [1] == '/' || path [1] == '\\') {
|
||||
string appPath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (appPath.Length > 1)
|
||||
return appPath + "/" + path.Substring (2);
|
||||
return "/" + path.Substring (2);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public static string ResolvePhysicalPathFromAppAbsolute (string path)
|
||||
{
|
||||
if (path [0] != '~') return path;
|
||||
|
||||
if (path.Length == 1)
|
||||
return HttpRuntime.AppDomainAppPath;
|
||||
|
||||
if (path [1] == '/' || path [1] == '\\') {
|
||||
string appPath = HttpRuntime.AppDomainAppPath;
|
||||
if (appPath.Length > 1)
|
||||
return appPath + "/" + path.Substring (2);
|
||||
return "/" + path.Substring (2);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Master Language="C#" AutoEventWireup="true" EnableTheming="false" CodeBehind="Util.master.cs" Inherits="Mainsoft.Web.AspnetConfig.Util" %>
|
||||
<%@ Register TagPrefix="Custom" Namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head id="Head1" runat="server">
|
||||
<link href="<%= Page.ClientScript.GetWebResourceUrl (typeof(Util), "Mainsoft.Web.AspnetConfig.aspnetconfig.Mainsoft.Web.AspnetConfig.css") %>" rel="stylesheet" type="text/css" />
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
<style type="text/css">
|
||||
A.SiteMap:visited { color: #507CD1; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="h1">
|
||||
Web Site Administration Tool
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="bordredtable">
|
||||
<tr style="background-color:">
|
||||
<td style="background-color: lightblue">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>Current page : </td>
|
||||
<td style="font-family: Verdana; font-size: 0.8em; color: #507CD1; font-weight:bold;">
|
||||
<table>
|
||||
<tr>
|
||||
<asp:ContentPlaceHolder ID="SiteMapLinks" runat="server"></asp:ContentPlaceHolder>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<asp:ContentPlaceHolder ID="Main" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Button ID="Back" runat="server" Text="Back" />
|
||||
<%--style="padding-right: 1px; padding-left: 1px; font-weight: bold; padding-bottom: 1px; margin: 1px; color: yellow; padding-top: 1px; background-color: #6699ff"--%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Resources;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Util : System.Web.UI.MasterPage
|
||||
{
|
||||
bool allowRemoteConfiguration // Default is false
|
||||
{
|
||||
get
|
||||
{
|
||||
if (System.Configuration.ConfigurationSettings.AppSettings["allowRemoteConfiguration"] != null) {
|
||||
return bool.Parse (System.Configuration.ConfigurationSettings.AppSettings["allowRemoteConfiguration"]);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String Backurl
|
||||
{
|
||||
get { return ViewState["BackUrl"] == null ? String.Empty : (string) ViewState["BackUrl"]; }
|
||||
set { ViewState["BackUrl"] = value; }
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
if (!(allowRemoteConfiguration || Request.IsLocal)) {
|
||||
Server.Transfer ("~/aspnetconfig/SecurError.aspx");
|
||||
}
|
||||
|
||||
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Util {
|
||||
protected System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected System.Web.UI.WebControls.ContentPlaceHolder SiteMapLinks;
|
||||
protected System.Web.UI.WebControls.ContentPlaceHolder Main;
|
||||
protected System.Web.UI.WebControls.Button Back;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<!--Minimalistic buildfile -->
|
||||
<project name="Mainsoft.Web.AspnetConfig" default="all">
|
||||
<property name="ghroot" value="${project::get-base-directory()}\..\..\..\..\.."/>
|
||||
<!--Allways at the beginning-->
|
||||
<include buildfile="${ghroot}\vsbuild\properties.xml" />
|
||||
|
||||
<!--MANDATORY SECTION-->
|
||||
|
||||
<!--Could be GH ANT .NET-->
|
||||
<property name="projecttype" value=".NET2005"/>
|
||||
<!--Could be RUNTIME TOOLS ... -->
|
||||
<property name="rules" value="RUNTIME"/>
|
||||
|
||||
<property name="msbuild_file" value="Mainsoft.Web.AspnetConfig.csproj"/>
|
||||
|
||||
<!--Fileset describing project output files. Uset by copy/delete rules in framework-->
|
||||
<fileset id="output" basedir="${project::get-base-directory()}\bin" failonempty="true">
|
||||
<include name="Mainsoft.Web.AspnetConfig.jar"/>
|
||||
<include name="Mainsoft.Web.AspnetConfig.dll"/>
|
||||
</fileset>
|
||||
|
||||
<!--END MANDATORY SECTION-->
|
||||
|
||||
<!--OPTIONAL SECTION-->
|
||||
<!--
|
||||
<target name="postbuild">
|
||||
|
||||
</target>
|
||||
-->
|
||||
<!--
|
||||
<property name="cvnsrc" value="svn://svn.myrealbox.com/source/trunk/mcs/<cvn_folder>"/>
|
||||
<target name="prebuild">
|
||||
Put something there if you need
|
||||
</target>
|
||||
-->
|
||||
<!--END OPTIONAL SECTION-->
|
||||
|
||||
|
||||
<!--Allways at the end-->
|
||||
<include buildfile="${ghroot}\vsbuild\framework.xml" />
|
||||
</project>
|
||||
Whitespace-only changes.
Binary file not shown.
|
Before Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,19 +0,0 @@
|
||||
/AbstractAttributeMap.cs -crlf
|
||||
/AspNetFacesContext.cs -crlf
|
||||
/BaseExternalContext.cs -crlf
|
||||
/BaseFacesPageHandlerFactory.cs -crlf
|
||||
/BaseFacesStateManager.cs -crlf
|
||||
/BaseFacesViewHandler.cs -crlf
|
||||
/ChangeLog -crlf
|
||||
/IExtendedViewHandler.cs -crlf
|
||||
/OutputStreamWrapper.cs -crlf
|
||||
/RequestParameterMap.cs -crlf
|
||||
/RequestParameterValuesMap.cs -crlf
|
||||
/ServletFacesContext.cs -crlf
|
||||
/ServletFacesPageHandler.cs -crlf
|
||||
/ServletFacesPageHandlerFactory.cs -crlf
|
||||
/ServletFacesStateManager.cs -crlf
|
||||
/ServletFacesViewHandler.cs -crlf
|
||||
/ServletIncludeUtils.cs -crlf
|
||||
/ServletResourceLoader.cs -crlf
|
||||
/SessionWrapper.cs -crlf
|
||||
@@ -1,333 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.AbstractAttributeMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using java.util;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
public abstract class AbstractAttributeMap : AbstractMap
|
||||
{
|
||||
private Set _keySet;
|
||||
private Collection _values;
|
||||
private Set _entrySet;
|
||||
|
||||
public override void clear () {
|
||||
List names = new ArrayList ();
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
names.add (e.nextElement ());
|
||||
}
|
||||
|
||||
for (Iterator it = names.iterator (); it.hasNext (); ) {
|
||||
removeAttribute ((String) it.next ());
|
||||
}
|
||||
}
|
||||
|
||||
public override bool containsKey (Object key) {
|
||||
return getAttribute (key.ToString ()) != null;
|
||||
}
|
||||
|
||||
public override bool containsValue (Object findValue) {
|
||||
if (findValue == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
Object value = getAttribute ((String) e.nextElement ());
|
||||
if (findValue.Equals (value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Set entrySet () {
|
||||
return (_entrySet != null) ? _entrySet : (_entrySet = new EntrySet (this));
|
||||
}
|
||||
|
||||
public override Object get (Object key) {
|
||||
return getAttribute (key.ToString ());
|
||||
}
|
||||
|
||||
public override bool isEmpty () {
|
||||
return !getAttributeNames ().hasMoreElements ();
|
||||
}
|
||||
|
||||
public override Set keySet () {
|
||||
return (_keySet != null) ? _keySet : (_keySet = new KeySet (this));
|
||||
}
|
||||
|
||||
public override Object put (Object key, Object value) {
|
||||
String key_ = key.ToString ();
|
||||
Object retval = getAttribute (key_);
|
||||
setAttribute (key_, value);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public override void putAll (Map t) {
|
||||
for (Iterator it = t.entrySet ().iterator (); it.hasNext (); ) {
|
||||
Map.Entry entry = (Map.Entry) it.next ();
|
||||
setAttribute (entry.getKey ().ToString (), entry.getValue ());
|
||||
}
|
||||
}
|
||||
|
||||
public override Object remove (Object key) {
|
||||
String key_ = key.ToString ();
|
||||
Object retval = getAttribute (key_);
|
||||
removeAttribute (key_);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public override int size () {
|
||||
int size = 0;
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
size++;
|
||||
e.nextElement ();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
public override Collection values () {
|
||||
return (_values != null) ? _values : (_values = new Values (this));
|
||||
}
|
||||
|
||||
|
||||
abstract protected Object getAttribute (string key);
|
||||
|
||||
abstract protected void setAttribute (string key, Object value);
|
||||
|
||||
abstract protected void removeAttribute (string key);
|
||||
|
||||
abstract protected Enumeration getAttributeNames ();
|
||||
|
||||
|
||||
private class KeySet : AbstractSet
|
||||
{
|
||||
protected readonly AbstractAttributeMap _owner;
|
||||
public KeySet (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new KeyIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool isEmpty () {
|
||||
return _owner.isEmpty ();
|
||||
}
|
||||
|
||||
public override int size () {
|
||||
return _owner.size ();
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
return _owner.containsKey (o);
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
return _owner.remove (o) != null;
|
||||
}
|
||||
|
||||
public override void clear () {
|
||||
_owner.clear ();
|
||||
}
|
||||
}
|
||||
|
||||
private class KeyIterator : Iterator
|
||||
{
|
||||
protected readonly AbstractAttributeMap _owner;
|
||||
protected readonly Enumeration _e;
|
||||
|
||||
public KeyIterator (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
_e = _owner.getAttributeNames ();
|
||||
}
|
||||
|
||||
protected Object _currentKey;
|
||||
|
||||
public virtual void remove () {
|
||||
// remove() may cause ConcurrentModificationException.
|
||||
// We could throw an exception here, but not throwing an exception
|
||||
// allows one call to remove() to succeed
|
||||
if (_currentKey == null) {
|
||||
throw new NoSuchElementException (
|
||||
"You must call next() at least once");
|
||||
}
|
||||
_owner.remove (_currentKey);
|
||||
}
|
||||
|
||||
public bool hasNext () {
|
||||
return _e.hasMoreElements ();
|
||||
}
|
||||
|
||||
public virtual Object next () {
|
||||
return _currentKey = _e.nextElement ();
|
||||
}
|
||||
}
|
||||
|
||||
private class Values : KeySet
|
||||
{
|
||||
|
||||
public Values (AbstractAttributeMap owner)
|
||||
: base (owner) {
|
||||
}
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new ValuesIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
return _owner.containsValue (o);
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Iterator it = iterator (); it.hasNext (); ) {
|
||||
if (o.Equals (it.next ())) {
|
||||
it.remove ();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private class ValuesIterator : KeyIterator
|
||||
{
|
||||
public ValuesIterator (AbstractAttributeMap owner)
|
||||
: base (owner) { }
|
||||
public override Object next () {
|
||||
base.next ();
|
||||
return _owner.get (_currentKey);
|
||||
}
|
||||
}
|
||||
|
||||
private class EntrySet : KeySet
|
||||
{
|
||||
public EntrySet (AbstractAttributeMap owner) : base (owner) { }
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new EntryIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
if (!(o is Map.Entry)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map.Entry entry = (Map.Entry) o;
|
||||
Object key = entry.getKey ();
|
||||
Object value = entry.getValue ();
|
||||
if (key == null || value == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return value.Equals (_owner.get (key));
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
if (!(o is Map.Entry)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map.Entry entry = (Map.Entry) o;
|
||||
Object key = entry.getKey ();
|
||||
Object value = entry.getValue ();
|
||||
if (key == null || value == null
|
||||
|| !value.Equals (_owner.get (key))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _owner.remove (((Map.Entry) o).getKey ()) != null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Not very efficient since it generates a new instance of <code>Entry</code>
|
||||
* for each element and still internaly uses the <code>KeyIterator</code>.
|
||||
* It is more efficient to use the <code>KeyIterator</code> directly.
|
||||
*/
|
||||
private class EntryIterator : KeyIterator
|
||||
{
|
||||
public EntryIterator (AbstractAttributeMap owner) : base (owner) { }
|
||||
public override Object next () {
|
||||
base.next ();
|
||||
// Must create new Entry every time--value of the entry must stay
|
||||
// linked to the same attribute name
|
||||
return new EntrySetEntry (_currentKey);
|
||||
}
|
||||
}
|
||||
|
||||
private class EntrySetEntry : Map.Entry
|
||||
{
|
||||
readonly AbstractAttributeMap _owner;
|
||||
|
||||
public EntrySetEntry (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
private readonly Object _currentKey;
|
||||
|
||||
public EntrySetEntry (Object currentKey) {
|
||||
_currentKey = currentKey;
|
||||
}
|
||||
|
||||
public Object getKey () {
|
||||
return _currentKey;
|
||||
}
|
||||
|
||||
public Object getValue () {
|
||||
return _owner.get (_currentKey);
|
||||
}
|
||||
|
||||
public Object setValue (Object value) {
|
||||
return _owner.put (_currentKey, value);
|
||||
}
|
||||
|
||||
public int hashCode () {
|
||||
return _currentKey == null ? 0 : _currentKey.GetHashCode ();
|
||||
}
|
||||
|
||||
public bool equals (Object obj) {
|
||||
if (!(obj is EntrySetEntry))
|
||||
return false;
|
||||
return _currentKey != null && _currentKey.Equals (obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using javax.servlet;
|
||||
using javax.faces.lifecycle;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class AspNetFacesContext : FacesContext
|
||||
{
|
||||
readonly FacesContext _oldFacesContex;
|
||||
readonly FacesContext _facesContex;
|
||||
readonly HttpContext _httpContext;
|
||||
readonly ExternalContext _externalContext;
|
||||
|
||||
public HttpContext Context {
|
||||
get { return _httpContext; }
|
||||
}
|
||||
|
||||
protected AspNetFacesContext (FacesContext wrappedFacesContex, ExternalContext externalContext, HttpContext httpContext, FacesContext oldFacesContex) {
|
||||
_facesContex = wrappedFacesContex;
|
||||
_httpContext = httpContext;
|
||||
_oldFacesContex = oldFacesContex;
|
||||
_externalContext = externalContext;
|
||||
setCurrentInstance (this);
|
||||
}
|
||||
|
||||
public bool IsProcessingInclude () {
|
||||
if (_oldFacesContex == null)
|
||||
return false;
|
||||
|
||||
if (getViewRoot ().getChildCount () == 0)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
Page page = (Page) getViewRoot ().getChildren ().get (0);
|
||||
return !page.IsPostBack;
|
||||
}
|
||||
|
||||
public override void addMessage (string __p1, javax.faces.application.FacesMessage __p2) {
|
||||
_facesContex.addMessage (__p1, __p2);
|
||||
}
|
||||
|
||||
public override javax.faces.application.Application getApplication () {
|
||||
return _facesContex.getApplication ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getClientIdsWithMessages () {
|
||||
return _facesContex.getClientIdsWithMessages ();
|
||||
}
|
||||
|
||||
public override ExternalContext getExternalContext () {
|
||||
return _externalContext;
|
||||
}
|
||||
|
||||
public override javax.faces.application.FacesMessage.Severity getMaximumSeverity () {
|
||||
return _facesContex.getMaximumSeverity ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getMessages (string __p1) {
|
||||
return _facesContex.getMessages (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Iterator getMessages () {
|
||||
return _facesContex.getMessages ();
|
||||
}
|
||||
|
||||
public override javax.faces.render.RenderKit getRenderKit () {
|
||||
return _facesContex.getRenderKit ();
|
||||
}
|
||||
|
||||
public override bool getRenderResponse () {
|
||||
return _facesContex.getRenderResponse ();
|
||||
}
|
||||
|
||||
public override bool getResponseComplete () {
|
||||
return _facesContex.getResponseComplete ();
|
||||
}
|
||||
|
||||
public override ResponseStream getResponseStream () {
|
||||
return _facesContex.getResponseStream ();
|
||||
}
|
||||
|
||||
public override ResponseWriter getResponseWriter () {
|
||||
return _facesContex.getResponseWriter ();
|
||||
}
|
||||
|
||||
public override javax.faces.component.UIViewRoot getViewRoot () {
|
||||
return _facesContex.getViewRoot ();
|
||||
}
|
||||
|
||||
public override void release () {
|
||||
_facesContex.release ();
|
||||
FacesContext.setCurrentInstance (_oldFacesContex);
|
||||
}
|
||||
|
||||
public override void renderResponse () {
|
||||
_facesContex.renderResponse ();
|
||||
}
|
||||
|
||||
public override void responseComplete () {
|
||||
_facesContex.responseComplete ();
|
||||
}
|
||||
|
||||
public override void setResponseStream (ResponseStream __p1) {
|
||||
_facesContex.setResponseStream (__p1);
|
||||
}
|
||||
|
||||
public override void setResponseWriter (ResponseWriter __p1) {
|
||||
_facesContex.setResponseWriter (__p1);
|
||||
}
|
||||
|
||||
public override void setViewRoot (javax.faces.component.UIViewRoot __p1) {
|
||||
_facesContex.setViewRoot (__p1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.BaseExternalContext.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using java.util;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract partial class BaseExternalContext : ExternalContext
|
||||
{
|
||||
readonly HttpContext _httpContext;
|
||||
readonly string _executionFilePath;
|
||||
|
||||
private Map _requestParameterMap;
|
||||
private Map _requestParameterValuesMap;
|
||||
|
||||
protected BaseExternalContext (HttpContext httpContext, string executionFilePath) {
|
||||
_httpContext = httpContext;
|
||||
_executionFilePath = executionFilePath;
|
||||
}
|
||||
|
||||
protected HttpContext Context {
|
||||
get { return _httpContext; }
|
||||
}
|
||||
|
||||
public override Map getRequestParameterMap () {
|
||||
return _requestParameterMap ?? (_requestParameterMap = new RequestParameterMap (Context.Request.Form));
|
||||
}
|
||||
|
||||
public override Iterator getRequestParameterNames () {
|
||||
return new IEnumeratorIteratorImpl (Context.Request.Form.Keys.GetEnumerator ());
|
||||
}
|
||||
|
||||
public override Map getRequestParameterValuesMap () {
|
||||
return _requestParameterValuesMap ?? (_requestParameterValuesMap = new RequestParameterValuesMap (Context.Request.Form));
|
||||
}
|
||||
|
||||
public override string getRequestPathInfo () {
|
||||
return _executionFilePath.Substring (getRequestContextPath ().Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Author: Igor Zelmanovich <[email protected]>
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.servlet;
|
||||
using javax.faces;
|
||||
using javax.faces.webapp;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesPageHandlerFactory : IHttpHandlerFactory
|
||||
{
|
||||
public abstract IHttpHandler GetHandler (HttpContext context, string requestType, string url, string pathTranslated);
|
||||
|
||||
public virtual void ReleaseHandler (IHttpHandler handler) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using javax.faces.component;
|
||||
using javax.faces.context;
|
||||
using System.Diagnostics;
|
||||
using System.Web.UI;
|
||||
using javax.faces.render;
|
||||
using javax.faces;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesStateManager : StateManager
|
||||
{
|
||||
protected static readonly string VIEWSTATE = "__VIEWSTATE";
|
||||
protected static readonly RenderKitFactory RenderKitFactory = (RenderKitFactory) FactoryFinder.getFactory (FactoryFinder.RENDER_KIT_FACTORY);
|
||||
|
||||
public override StateManager.SerializedView saveSerializedView (FacesContext facesContext) {
|
||||
Object treeStruct = getTreeStructureToSave (facesContext);
|
||||
Object compStates = getComponentStateToSave (facesContext);
|
||||
SerializedView serializedView = new SerializedView (this, treeStruct, compStates);
|
||||
return serializedView;
|
||||
}
|
||||
|
||||
protected override sealed Object getTreeStructureToSave (FacesContext facesContext) {
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public override UIViewRoot restoreView (FacesContext facesContext,
|
||||
String viewId,
|
||||
String renderKitId) {
|
||||
|
||||
UIViewRoot uiViewRoot = restoreTreeStructure (facesContext, viewId, renderKitId);
|
||||
Page page = (Page) uiViewRoot.getChildren ().get (0);
|
||||
if (page.IsPostBack || page.IsCallback)
|
||||
restoreComponentState (facesContext, uiViewRoot, renderKitId);
|
||||
else
|
||||
facesContext.renderResponse ();
|
||||
return uiViewRoot;
|
||||
}
|
||||
|
||||
protected override sealed UIViewRoot restoreTreeStructure (FacesContext facesContext, string viewId, string renderKitId) {
|
||||
return facesContext.getApplication ().getViewHandler ().createView (facesContext, viewId);
|
||||
}
|
||||
|
||||
protected override Object getComponentStateToSave (FacesContext facesContext) {
|
||||
Trace.WriteLine ("Entering getComponentStateToSave");
|
||||
|
||||
UIViewRoot viewRoot = facesContext.getViewRoot ();
|
||||
if (viewRoot.isTransient ()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Object serializedComponentStates = ((UIComponent) viewRoot.getChildren ().get (0)).processSaveState (facesContext);
|
||||
//Locale is a state attribute of UIViewRoot and need not be saved explicitly
|
||||
Trace.WriteLine ("Exiting getComponentStateToSave");
|
||||
return serializedComponentStates;
|
||||
}
|
||||
|
||||
protected void SaveStateInClient (FacesContext facesContext, StateManager.SerializedView serializedView) {
|
||||
//UIViewRoot uiViewRoot = facesContext.getViewRoot ();
|
||||
////save state in response (client-side: full state; server-side: sequence)
|
||||
//RenderKit renderKit = RenderKitFactory.getRenderKit (facesContext, uiViewRoot.getRenderKitId ());
|
||||
//// not us.
|
||||
//renderKit.getResponseStateManager ().writeState (facesContext, serializedView);
|
||||
|
||||
java.io.ByteArrayOutputStream bytearrayoutputstream = new java.io.ByteArrayOutputStream ();
|
||||
java.io.ObjectOutputStream objectoutputstream = new java.io.ObjectOutputStream (bytearrayoutputstream);
|
||||
|
||||
//ignore tree structure
|
||||
//objectoutputstream.writeObject (serializedView.getStructure ());
|
||||
objectoutputstream.writeObject (serializedView.getState ());
|
||||
objectoutputstream.close ();
|
||||
bytearrayoutputstream.close ();
|
||||
|
||||
string s =
|
||||
@"<div>
|
||||
<input type=""hidden"" name=""" + VIEWSTATE + "\" id=\"" + VIEWSTATE + "\" value=\"" +
|
||||
Convert.ToBase64String ((byte []) vmw.common.TypeUtils.ToByteArray (bytearrayoutputstream.toByteArray ())) + @""" />
|
||||
</div>";
|
||||
facesContext.getResponseWriter ().write (s);
|
||||
}
|
||||
|
||||
protected object GetStateFromClient (FacesContext facesContext, String viewId, String renderKitId) {
|
||||
//RenderKit renderKit = RenderKitFactory.getRenderKit (facesContext, renderKitId);
|
||||
//ResponseStateManager responseStateManager = renderKit.getResponseStateManager ();
|
||||
//responseStateManager.getTreeStructureToRestore (facesContext, viewId); //ignore result. Must call for compatibility with sun implementation.
|
||||
//return responseStateManager.getComponentStateToRestore (facesContext);
|
||||
|
||||
java.util.Map map = facesContext.getExternalContext ().getRequestParameterMap ();
|
||||
string s1 = (string) map.get (VIEWSTATE);
|
||||
|
||||
byte [] buffer = Convert.FromBase64String (s1);
|
||||
java.io.ByteArrayInputStream bytearrayinputstream = new java.io.ByteArrayInputStream (vmw.common.TypeUtils.ToSByteArray (buffer));
|
||||
java.io.ObjectInputStream inputStream = new java.io.ObjectInputStream (bytearrayinputstream);
|
||||
//ignore tree structure
|
||||
//inputStream.readObject ();
|
||||
object state = inputStream.readObject ();
|
||||
inputStream.close ();
|
||||
bytearrayinputstream.close ();
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using java.util;
|
||||
using javax.faces.context;
|
||||
using javax.faces.component;
|
||||
using javax.faces.render;
|
||||
using System.Web.UI;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesViewHandler : ViewHandler, IExtendedViewHandler
|
||||
{
|
||||
readonly ViewHandler _viewHandler;
|
||||
public static readonly string NAMESPACE = "__NAMESPACE";
|
||||
|
||||
public BaseFacesViewHandler (ViewHandler viewHandler) {
|
||||
_viewHandler = viewHandler;
|
||||
}
|
||||
|
||||
public override string getActionURL (FacesContext facesContext, string viewId) {
|
||||
return _viewHandler.getActionURL (facesContext, viewId);
|
||||
}
|
||||
|
||||
public override Locale calculateLocale (FacesContext facesContext) {
|
||||
return _viewHandler.calculateLocale (facesContext);
|
||||
}
|
||||
|
||||
public override String calculateRenderKitId (FacesContext facesContext) {
|
||||
return _viewHandler.calculateRenderKitId (facesContext);
|
||||
}
|
||||
|
||||
public override UIViewRoot createView (FacesContext facesContext, String viewId) {
|
||||
|
||||
// create instance of Page by viewId
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (facesContext.getExternalContext ().getRequestContextPath ());
|
||||
sb.Append (viewId);
|
||||
IHttpHandler page = PageParser.GetCompiledPageInstance (sb.ToString (), null, ((AspNetFacesContext) facesContext).Context);
|
||||
|
||||
HttpContext context = ((AspNetFacesContext) facesContext).Context;
|
||||
page.ProcessRequest (context);
|
||||
|
||||
UIViewRoot uiViewRoot = _viewHandler.createView (facesContext, viewId);
|
||||
uiViewRoot.getChildren ().add (0, (UIComponent) page);
|
||||
|
||||
Trace.WriteLine ("Created view " + viewId);
|
||||
return uiViewRoot;
|
||||
}
|
||||
|
||||
public override String getResourceURL (FacesContext facesContext, String path) {
|
||||
return _viewHandler.getResourceURL (facesContext, path);
|
||||
}
|
||||
|
||||
public override void renderView (FacesContext facesContext, UIViewRoot viewToRender) {
|
||||
if (viewToRender == null)
|
||||
throw new ArgumentNullException ("viewToRender", "viewToRender must not be null");
|
||||
((UIComponent) viewToRender.getChildren ().get (0)).encodeChildren (facesContext);
|
||||
}
|
||||
|
||||
|
||||
public override UIViewRoot restoreView (FacesContext facesContext, String viewId) {
|
||||
return _viewHandler.restoreView (facesContext, viewId);
|
||||
}
|
||||
|
||||
public override void writeState (FacesContext facesContext) {
|
||||
StateManager manager = facesContext.getApplication ().getStateManager ();
|
||||
StateManager.SerializedView serializedView = manager.saveSerializedView (facesContext);
|
||||
manager.writeState (facesContext, serializedView);
|
||||
}
|
||||
|
||||
public virtual string EncodeNamespace (FacesContext facesContext, string value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,396 +0,0 @@
|
||||
//
|
||||
// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Threading;
|
||||
using System.Web.Hosting;
|
||||
using System.IO;
|
||||
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using java.util;
|
||||
using vmw.@internal;
|
||||
using java.lang.reflect;
|
||||
using java.net;
|
||||
using System.Globalization;
|
||||
using System.Diagnostics;
|
||||
using javax.faces;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces.webapp;
|
||||
using javax.faces.render;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public interface IJDBCDriverDeregisterer
|
||||
{
|
||||
void DeregisterDriver (java.sql.Driver driver);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : HttpServlet, IJDBCDriverDeregisterer
|
||||
{
|
||||
bool _appVirDirInited = false;
|
||||
|
||||
static FacesContextFactory _facesContextFactory;
|
||||
static Lifecycle _lifecycle;
|
||||
static RenderKitFactory _renderKitFactory;
|
||||
|
||||
public BaseHttpServlet()
|
||||
{
|
||||
}
|
||||
|
||||
public static RenderKitFactory RenderKitFactory {
|
||||
get { return _renderKitFactory; }
|
||||
}
|
||||
|
||||
public static FacesContextFactory FacesContextFactory {
|
||||
get { return _facesContextFactory; }
|
||||
}
|
||||
|
||||
public static Lifecycle Lifecycle {
|
||||
get { return _lifecycle; }
|
||||
}
|
||||
|
||||
override public void init(ServletConfig config)
|
||||
{
|
||||
base.init(config);
|
||||
InitRuntime (config, this);
|
||||
}
|
||||
|
||||
public static void InitRuntime (ServletConfig config, object evidence) {
|
||||
|
||||
ServletContext context = config.getServletContext ();
|
||||
|
||||
if (context.getAttribute (J2EEConsts.APP_DOMAIN) != null)
|
||||
return;
|
||||
|
||||
_facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory (FactoryFinder.FACES_CONTEXT_FACTORY);
|
||||
//TODO: null-check for Weblogic, that tries to initialize Servlet before ContextListener
|
||||
|
||||
//Javadoc says: Lifecycle instance is shared across multiple simultaneous requests, it must be implemented in a thread-safe manner.
|
||||
//So we can acquire it here once:
|
||||
LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory (FactoryFinder.LIFECYCLE_FACTORY);
|
||||
_lifecycle = lifecycleFactory.getLifecycle (context.getInitParameter (FacesServlet.LIFECYCLE_ID_ATTR) ?? LifecycleFactory.DEFAULT_LIFECYCLE);
|
||||
|
||||
_renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory (FactoryFinder.RENDER_KIT_FACTORY);
|
||||
|
||||
AppDomain servletDomain = createServletDomain (config);
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain (servletDomain);
|
||||
|
||||
try {
|
||||
//GH Infromation Initizalization
|
||||
long currentTime = java.lang.System.currentTimeMillis ();
|
||||
servletDomain.SetData (".domainId", currentTime.ToString ("x"));
|
||||
currentTime = ~currentTime;
|
||||
servletDomain.SetData (".appId", currentTime.ToString ("x"));
|
||||
servletDomain.SetData (".appName", servletDomain.SetupInformation.ApplicationName);
|
||||
|
||||
servletDomain.SetData (J2EEConsts.CLASS_LOADER, java.lang.Thread.currentThread ().getContextClassLoader ());
|
||||
//servletDomain.SetData (J2EEConsts.CLASS_LOADER, vmw.common.TypeUtils.ToClass (evidence).getClassLoader ());
|
||||
//servletDomain.SetData(J2EEConsts.SERVLET_CONFIG, config);
|
||||
servletDomain.SetData (J2EEConsts.RESOURCE_LOADER, new ServletResourceLoader (context));
|
||||
|
||||
lock (evidence) {
|
||||
if (context.getAttribute (J2EEConsts.APP_DOMAIN) == null)
|
||||
context.setAttribute (J2EEConsts.APP_DOMAIN, servletDomain);
|
||||
}
|
||||
//config.getServletContext ().setAttribute (J2EEConsts.CURRENT_SERVLET, this);
|
||||
}
|
||||
finally {
|
||||
vmw.@internal.EnvironmentUtils.cleanTLS ();
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain ();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void service (HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
const string assemblies = "/assemblies";
|
||||
const string getping = "getping";
|
||||
const string setping = "setping";
|
||||
const string version = "2.2";
|
||||
string servletPath = req.getServletPath ();
|
||||
|
||||
if (String.CompareOrdinal (assemblies, 0, servletPath, 0, assemblies.Length) == 0) {
|
||||
if (servletPath.Length == assemblies.Length ||
|
||||
servletPath [assemblies.Length] == '/') {
|
||||
string requestURI = req.getRequestURI ();
|
||||
bool getp = requestURI.EndsWith (getping, StringComparison.Ordinal);
|
||||
if (!getp && requestURI.EndsWith (setping, StringComparison.Ordinal)) {
|
||||
getServletContext().setAttribute(getping, version);
|
||||
getp = true;
|
||||
}
|
||||
|
||||
if (getp) {
|
||||
string ping = (string) getServletContext ().getAttribute (getping);
|
||||
if (ping == null)
|
||||
ping = "0";
|
||||
resp.getOutputStream ().print (ping);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
resp.setContentType ("text/html");
|
||||
|
||||
try
|
||||
{
|
||||
// Very important - to update Virtual Path!!!
|
||||
AppDomain servletDomain = (AppDomain)this.getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
|
||||
if (!_appVirDirInited) {
|
||||
string appVPath = req.getContextPath ();
|
||||
if (appVPath == null || appVPath.Length == 0)
|
||||
appVPath = "/";
|
||||
servletDomain.SetData (IAppDomainConfig.APP_VIRT_DIR, appVPath);
|
||||
servletDomain.SetData (".hostingVirtualPath", req.getContextPath ());
|
||||
_appVirDirInited = true;
|
||||
}
|
||||
|
||||
// Put to the TLS current AppDomain of the servlet, so anyone can use it.
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain(servletDomain);
|
||||
|
||||
// put request to the TLS
|
||||
//Thread.SetData(_servletRequestSlot, req);
|
||||
//// put response to the TLS
|
||||
//Thread.SetData(_servletResponseSlot, resp);
|
||||
//// put the servlet object to the TLS
|
||||
//Thread.SetData(_servletSlot, this);
|
||||
|
||||
resp.setHeader("X-Powered-By", "ASP.NET");
|
||||
resp.setHeader("X-AspNet-Version", "1.1.4322");
|
||||
|
||||
HttpWorkerRequest gwr = new ServletWorkerRequest (this, req, resp);
|
||||
CultureInfo culture = (CultureInfo) vmw.@internal.EnvironmentUtils.getCultureInfoFromLocale (req.getLocale ());
|
||||
Thread currentTread = Thread.CurrentThread;
|
||||
currentTread.CurrentCulture = culture;
|
||||
currentTread.CurrentUICulture = culture;
|
||||
HttpRuntime.ProcessRequest(gwr);
|
||||
}
|
||||
finally
|
||||
{
|
||||
HttpContext.Current = null;
|
||||
//Thread.SetData(_servletRequestSlot, null);
|
||||
//Thread.SetData(_servletResponseSlot, null);
|
||||
//Thread.SetData(_servletSlot, null);
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain();
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy()
|
||||
{
|
||||
base.destroy();
|
||||
DestroyRuntime (getServletContext (), this);
|
||||
}
|
||||
|
||||
public static void DestroyRuntime (ServletContext context, IJDBCDriverDeregisterer evidence) {
|
||||
AppDomain servletDomain = (AppDomain) context.getAttribute (J2EEConsts.APP_DOMAIN);
|
||||
if (servletDomain == null)
|
||||
return;
|
||||
|
||||
try {
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain (servletDomain);
|
||||
Debug.WriteLine ("Destroy of GhHttpServlet");
|
||||
HttpRuntime.Close ();
|
||||
vmw.@internal.EnvironmentUtils.cleanAllBeforeServletDestroy (evidence);
|
||||
context.removeAttribute (J2EEConsts.APP_DOMAIN);
|
||||
try {
|
||||
FactoryFinder.releaseFactories ();
|
||||
}
|
||||
catch (FacesException) { }
|
||||
|
||||
java.lang.ClassLoader appClassLoader = vmw.common.TypeUtils.ToClass (evidence).getClassLoader ();
|
||||
|
||||
IJDBCDriverDeregisterer dereg = evidence;
|
||||
|
||||
java.util.Enumeration en = java.sql.DriverManager.getDrivers ();
|
||||
while (en.hasMoreElements ()) {
|
||||
Object o = en.nextElement ();
|
||||
if (vmw.common.TypeUtils.ToClass (o).getClassLoader () == appClassLoader)
|
||||
dereg.DeregisterDriver ((java.sql.Driver) o);
|
||||
}
|
||||
|
||||
java.lang.Thread.currentThread ().setContextClassLoader (null);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Debug.WriteLine (String.Format ("ERROR in Servlet Destroy {0},{1}", e.GetType (), e.Message));
|
||||
Debug.WriteLine (e.StackTrace);
|
||||
}
|
||||
finally {
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain ();
|
||||
}
|
||||
}
|
||||
|
||||
private static AppDomain createServletDomain(ServletConfig config)
|
||||
{
|
||||
string rootPath = J2EEUtils.GetApplicationRealPath(config.getServletContext ());
|
||||
AppDomainSetup domainSetup = new AppDomainSetup();
|
||||
string name = config.getServletName();//.getServletContextName();
|
||||
if (name == null)
|
||||
name = "GH Application";
|
||||
domainSetup.ApplicationName = name;
|
||||
domainSetup.ConfigurationFile = Path.Combine (rootPath, "Web.config");
|
||||
domainSetup.PrivateBinPath = Path.Combine (rootPath, "WEB-INF/lib");
|
||||
|
||||
AppDomain servletDomain = AppDomain.CreateDomain(name, null, domainSetup);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//servletDomain.SetData(IAppDomainConfig.APP_PHYS_DIR, J2EEUtils.GetApplicationPhysicalPath(config));
|
||||
//servletDomain.SetData(IAppDomainConfig.WEB_APP_DIR, rootPath);
|
||||
|
||||
servletDomain.SetData(IAppDomainConfig.APP_PHYS_DIR, J2EEUtils.GetApplicationPhysicalPath(config.getServletContext ()));
|
||||
servletDomain.SetData(IAppDomainConfig.WEB_APP_DIR, rootPath);
|
||||
servletDomain.SetData(IAppDomainConfig.SERVLET_CONFIG, config);
|
||||
|
||||
//Set DataDirectory substitution string (http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx)
|
||||
string dataDirectory = config.getServletContext ().getInitParameter ("DataDirectory");
|
||||
if (dataDirectory == null)
|
||||
dataDirectory = "App_Data";
|
||||
|
||||
if (!Path.IsPathRooted (dataDirectory)) {
|
||||
java.io.InputStream inputStream = config.getServletContext ().getResourceAsStream ("/WEB-INF/classes/appData.properties");
|
||||
string root;
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
Properties props = new Properties ();
|
||||
props.load (inputStream);
|
||||
root = props.getProperty ("root.folder");
|
||||
}
|
||||
finally {
|
||||
inputStream.close ();
|
||||
}
|
||||
}
|
||||
else
|
||||
root = config.getServletContext ().getRealPath ("/");
|
||||
|
||||
if (root == null)
|
||||
root = String.Empty;
|
||||
|
||||
dataDirectory = Path.Combine (root, dataDirectory);
|
||||
}
|
||||
|
||||
if (dataDirectory [dataDirectory.Length - 1] != Path.DirectorySeparatorChar)
|
||||
dataDirectory += Path.DirectorySeparatorChar;
|
||||
|
||||
servletDomain.SetData ("DataDirectory", dataDirectory);
|
||||
|
||||
if (config.getServletContext ().getRealPath ("/") == null)
|
||||
servletDomain.SetData(".appStartTime", DateTime.UtcNow);
|
||||
|
||||
// The BaseDir is the full path to the physical dir of the app
|
||||
// and allows the application to modify files in the case of
|
||||
// open deployment.
|
||||
string webApp_baseDir = config.getServletContext().getRealPath("");
|
||||
if (webApp_baseDir == null || webApp_baseDir == "")
|
||||
webApp_baseDir = rootPath;
|
||||
servletDomain.SetData(IAppDomainConfig.APP_BASE_DIR , webApp_baseDir);
|
||||
Debug.WriteLine("Initialization of webapp " + webApp_baseDir);
|
||||
//servletDomain.SetData(".hostingVirtualPath", "/");
|
||||
//servletDomain.SetData(".hostingInstallDir", "/");
|
||||
return servletDomain;
|
||||
}
|
||||
|
||||
#region IJDBCDriverDeregisterer Members
|
||||
|
||||
public void DeregisterDriver (java.sql.Driver driver) {
|
||||
java.sql.DriverManager.deregisterDriver (driver);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : Mainsoft.Web.Hosting.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace System.Web.J2EE
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : Mainsoft.Web.Hosting.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class GhDynamicHttpServlet : System.Web.GH.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
public class GhStaticHttpServlet : System.Web.GH.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
public class GhHttpServlet : System.Web.GH.BaseHttpServlet
|
||||
{
|
||||
GhStaticHttpServlet staticServlet;
|
||||
|
||||
public GhHttpServlet () {
|
||||
staticServlet = new GhStaticHttpServlet ();
|
||||
}
|
||||
|
||||
override public void init (ServletConfig config) {
|
||||
base.init (config);
|
||||
staticServlet.init (config);
|
||||
}
|
||||
|
||||
override protected void service (HttpServletRequest req, HttpServletResponse resp) {
|
||||
string pathInfo = req.getRequestURI ();
|
||||
string contextPath = req.getContextPath ();
|
||||
if (pathInfo.Equals (contextPath) ||
|
||||
((pathInfo.Length - contextPath.Length) == 1) &&
|
||||
pathInfo [pathInfo.Length - 1] == '/' && pathInfo.StartsWith (contextPath))
|
||||
pathInfo = contextPath + req.getServletPath ();
|
||||
if (pathInfo.EndsWith (".aspx") ||
|
||||
pathInfo.EndsWith (".asmx") ||
|
||||
pathInfo.EndsWith (".invoke")) {
|
||||
base.service (req, resp);
|
||||
}
|
||||
else {
|
||||
staticServlet.service (req, resp);
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy () {
|
||||
staticServlet.destroy ();
|
||||
base.destroy ();
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
//
|
||||
// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : HttpServlet
|
||||
{
|
||||
public BaseStaticHttpServlet()
|
||||
{
|
||||
}
|
||||
|
||||
override public void init(ServletConfig config)
|
||||
{
|
||||
base.init(config);
|
||||
AppDir = config.getServletContext ().getInitParameter (IAppDomainConfig.APP_DIR_NAME);
|
||||
if (AppDir != null) {
|
||||
AppDir = AppDir.Replace('\\', '/');
|
||||
if (AppDir[AppDir.Length - 1] != '/')
|
||||
AppDir += '/';
|
||||
}
|
||||
}
|
||||
|
||||
override protected void service(HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
resp.setHeader("X-Powered-By", "ASP.NET");
|
||||
resp.setHeader("X-AspNet-Version", "1.1.4322");
|
||||
|
||||
String filename = getServletContext().getRealPath(req.getServletPath());
|
||||
ServletOutputStream hos;
|
||||
try {
|
||||
hos = resp.getOutputStream();
|
||||
}
|
||||
catch (java.lang.IllegalStateException e)
|
||||
{
|
||||
string mimeType = getServletContext().getMimeType(filename);
|
||||
if (mimeType == null || mimeType.StartsWith("text")) {
|
||||
sendFileUsingWriter(resp, filename);
|
||||
return;
|
||||
}
|
||||
else
|
||||
throw e;
|
||||
}
|
||||
try
|
||||
{
|
||||
string mimeType = this.getServletContext().getMimeType(filename);
|
||||
if (mimeType == null)
|
||||
mimeType = "text/plain";
|
||||
|
||||
resp.setContentType(mimeType);
|
||||
|
||||
FileStream fis = null;
|
||||
try {
|
||||
fis = new FileStream(filename,FileMode.Open,FileAccess.Read);
|
||||
byte[] buf = new byte[4 * 1024]; // 4K buffer
|
||||
int bytesRead;
|
||||
while ((bytesRead = fis.Read(buf,0,buf.Length)) != -1 &&
|
||||
bytesRead != 0) {
|
||||
hos.write(TypeUtils.ToSByteArray(buf), 0, bytesRead);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (fis != null) fis.Close();
|
||||
}
|
||||
}
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
resp.setStatus(404,"Object Not Found.");
|
||||
HttpException myExp = new HttpException (404, "File '" + filename + "' not found.");
|
||||
hos.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
hos.flush();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Trace.WriteLine (String.Format ("ERROR in Static File Reading {0},{1}", e.GetType (), e.Message));
|
||||
resp.setStatus(500);
|
||||
HttpException myExp = new HttpException ("Exception in Reading static file", e);
|
||||
hos.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
hos.flush();
|
||||
}
|
||||
}
|
||||
|
||||
void sendFileUsingWriter(HttpServletResponse resp, string filename)
|
||||
{
|
||||
java.io.PrintWriter writer = resp.getWriter();
|
||||
try
|
||||
{
|
||||
resp.setContentType(this.getServletContext().getMimeType(filename));
|
||||
StreamReader fis = null;
|
||||
char[] buf = new char[4 * 1024]; // 4K buffer
|
||||
try {
|
||||
fis = new StreamReader(filename);
|
||||
int charsRead;
|
||||
while ((charsRead = fis.Read(buf,0,buf.Length)) != -1 &&
|
||||
charsRead != 0) {
|
||||
writer.write(buf, 0, charsRead);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (fis != null) fis.Close();
|
||||
}
|
||||
}
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
resp.setStatus(404,"Object Not Found.");
|
||||
HttpException myExp = new HttpException (404, "File '" + filename + "' not found.");
|
||||
writer.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
writer.flush();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Trace.WriteLine (String.Format ("ERROR in Static File Reading {0},{1}", e.GetType (), e.Message));
|
||||
resp.setStatus(500);
|
||||
HttpException myExp = new HttpException ("Exception in Reading static file", e);
|
||||
writer.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
writer.flush();
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy()
|
||||
{
|
||||
base.destroy();
|
||||
}
|
||||
|
||||
private string AppDir;
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.J2EE
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : Mainsoft.Web.Hosting.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : Mainsoft.Web.Hosting.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public interface IExtendedViewHandler
|
||||
{
|
||||
string EncodeNamespace (FacesContext facesContext, string value);
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.IncludeHelperServlet
|
||||
//
|
||||
// Authors:
|
||||
// Eyal Alaluf ([email protected])
|
||||
//
|
||||
// (C) 2006 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.UI;
|
||||
using java.io;
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class IncludeHelperServlet : HttpServlet
|
||||
{
|
||||
public IncludeHelperServlet()
|
||||
{
|
||||
}
|
||||
|
||||
override protected void service(HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
string servletPath = ServletIncludeUtils.getServletPath(req);
|
||||
TextWriter writer = (TextWriter)ServletIncludeUtils.getTextWriter(req);
|
||||
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(servletPath);
|
||||
HttpServletResponseWrapper wrapper = new AspxResponseWrapper(resp, writer);
|
||||
dispatcher.include(req, wrapper);
|
||||
}
|
||||
|
||||
sealed class AspxResponseWrapper : HttpServletResponseWrapper
|
||||
{
|
||||
public AspxResponseWrapper(HttpServletResponse resp, TextWriter writer) : base (resp)
|
||||
{
|
||||
jwriter = new PrintWriter(new JavaWriterFromTextWriter(writer));
|
||||
}
|
||||
|
||||
public override PrintWriter getWriter()
|
||||
{
|
||||
return jwriter;
|
||||
}
|
||||
|
||||
readonly PrintWriter jwriter;
|
||||
}
|
||||
|
||||
sealed class JavaWriterFromTextWriter : Writer
|
||||
{
|
||||
public JavaWriterFromTextWriter(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
}
|
||||
|
||||
public override void flush()
|
||||
{
|
||||
writer.Flush ();
|
||||
}
|
||||
|
||||
public override void write(char[] buffer, int offset, int count)
|
||||
{
|
||||
writer.Write(buffer, offset, count);
|
||||
}
|
||||
|
||||
public override void write(String s)
|
||||
{
|
||||
writer.Write(s);
|
||||
}
|
||||
|
||||
public override void write(string s, int start, int count)
|
||||
{
|
||||
if (start == 0 && count == s.Length)
|
||||
writer.Write(s);
|
||||
else
|
||||
writer.Write(s.Substring(start, count));
|
||||
}
|
||||
|
||||
public override void close()
|
||||
{
|
||||
// Ignore close as we don't own here the writer.
|
||||
}
|
||||
|
||||
readonly TextWriter writer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class IncludeHelperServlet : Mainsoft.Web.Hosting.IncludeHelperServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.OutputStreamWrapper
|
||||
//
|
||||
// Authors:
|
||||
// Vladimir Krasnov ([email protected])
|
||||
//
|
||||
// (C) 2006 Mainsoft
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using java.io;
|
||||
using vmw.common;
|
||||
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class OutputStreamWrapper : java.io.Writer
|
||||
{
|
||||
enum OutputMode
|
||||
{
|
||||
CharWriter,
|
||||
ByteStream,
|
||||
}
|
||||
|
||||
readonly PrintWriter _printWriter;
|
||||
readonly OutputStream _outputStream;
|
||||
readonly OutputMode _outputMode;
|
||||
|
||||
private byte [] _bytebuffer;
|
||||
private char [] _charBuffer;
|
||||
//sbyte [] _oneByte = new sbyte [1];
|
||||
|
||||
Encoding _encoding = null;
|
||||
|
||||
/// <summary>
|
||||
/// Ctor from writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
public OutputStreamWrapper (PrintWriter writer)
|
||||
{
|
||||
_printWriter = writer;
|
||||
_outputMode = OutputMode.CharWriter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ctor from stream
|
||||
/// </summary>
|
||||
/// <param name="outputStream"></param>
|
||||
public OutputStreamWrapper (OutputStream outputStream)
|
||||
{
|
||||
_outputStream = outputStream;
|
||||
_outputMode = OutputMode.ByteStream;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void close ()
|
||||
{
|
||||
// BUGBUG
|
||||
// on WPS, closing the writer causes
|
||||
// any portlets rendered after us to be not shown...
|
||||
//_writer.close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushes servers stream
|
||||
/// </summary>
|
||||
public override void flush ()
|
||||
{
|
||||
if (_outputMode == OutputMode.CharWriter)
|
||||
_printWriter.flush ();
|
||||
else
|
||||
_outputStream.flush();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes char array
|
||||
/// </summary>
|
||||
/// <param name="chars"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="count"></param>
|
||||
public override void write (char [] chars, int index, int count)
|
||||
{
|
||||
if (_outputMode == OutputMode.CharWriter) {
|
||||
_printWriter.write (chars, index, count);
|
||||
}
|
||||
else {
|
||||
int length = Encoding.GetMaxByteCount (count);
|
||||
byte [] bytebuffer = GetByteBuffer (length);
|
||||
int realLength = Encoding.GetBytes (chars, index, count, bytebuffer, 0);
|
||||
|
||||
_outputStream.write (TypeUtils.ToSByteArray (bytebuffer), 0, realLength);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes byte array
|
||||
/// </summary>
|
||||
/// <param name="sbytes"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="count"></param>
|
||||
public void write (sbyte [] sbytes, int index, int count)
|
||||
{
|
||||
if (_outputMode == OutputMode.ByteStream)
|
||||
_outputStream.write (sbytes, index, count);
|
||||
else {
|
||||
int length = Encoding.GetMaxCharCount (count);
|
||||
char [] charbuffer = GetCharBuffer (length);
|
||||
int realLength = Encoding.GetChars ((byte []) TypeUtils.ToByteArray (sbytes), index, count, charbuffer, 0);
|
||||
|
||||
_printWriter.write (charbuffer, 0, realLength);
|
||||
}
|
||||
}
|
||||
|
||||
private char [] GetCharBuffer (int length)
|
||||
{
|
||||
// We will reuse the buffer if its size is < 32K
|
||||
if (_charBuffer != null && _charBuffer.Length >= length)
|
||||
return _charBuffer;
|
||||
|
||||
if (length > 32 * 1024)
|
||||
return new char [length];
|
||||
|
||||
if (length < 1024)
|
||||
length = 1024;
|
||||
|
||||
_charBuffer = new char [length];
|
||||
return _charBuffer;
|
||||
}
|
||||
|
||||
private byte [] GetByteBuffer (int length)
|
||||
{
|
||||
// We will reuse the buffer if its size is < 32K
|
||||
if (_bytebuffer != null && _bytebuffer.Length >= length)
|
||||
return _bytebuffer;
|
||||
|
||||
if (length > 32 * 1024)
|
||||
return new byte [length];
|
||||
|
||||
if (length < 1024)
|
||||
length = 1024;
|
||||
|
||||
_bytebuffer = new byte [length];
|
||||
return _bytebuffer;
|
||||
}
|
||||
|
||||
private Encoding Encoding
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_encoding == null) {
|
||||
HttpContext current = HttpContext.Current;
|
||||
_encoding = (current != null) ? current.Response.ContentEncoding : Encoding.UTF8;
|
||||
}
|
||||
return _encoding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.RequestParameterMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using java.util;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections;
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
abstract class BaseRequestParameterMap : AbstractAttributeMap
|
||||
{
|
||||
readonly NameValueCollection _form;
|
||||
|
||||
protected BaseRequestParameterMap (NameValueCollection form) {
|
||||
_form = form;
|
||||
}
|
||||
|
||||
protected NameValueCollection Form {
|
||||
get { return _form; }
|
||||
}
|
||||
|
||||
protected override void setAttribute (String key, Object value) {
|
||||
throw new NotSupportedException (
|
||||
"Cannot set Request Parameter");
|
||||
}
|
||||
|
||||
protected override void removeAttribute (String key) {
|
||||
throw new NotSupportedException (
|
||||
"Cannot remove Request Parameter");
|
||||
}
|
||||
|
||||
protected override Enumeration getAttributeNames () {
|
||||
return new EnumerationImpl (_form.Keys.GetEnumerator ());
|
||||
}
|
||||
|
||||
sealed class EnumerationImpl : Enumeration
|
||||
{
|
||||
readonly IEnumerator _en;
|
||||
public EnumerationImpl (IEnumerator en) {
|
||||
_en = en;
|
||||
}
|
||||
|
||||
#region Enumeration Members
|
||||
|
||||
public bool hasMoreElements () {
|
||||
return _en.MoveNext ();
|
||||
}
|
||||
|
||||
public object nextElement () {
|
||||
return _en.Current;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
sealed class RequestParameterMap : BaseRequestParameterMap
|
||||
{
|
||||
public RequestParameterMap (NameValueCollection form)
|
||||
: base (form) {
|
||||
}
|
||||
|
||||
protected override Object getAttribute (String key) {
|
||||
return Form [key];
|
||||
}
|
||||
}
|
||||
|
||||
sealed class IEnumeratorIteratorImpl : Iterator
|
||||
{
|
||||
readonly private IEnumerator _en;
|
||||
|
||||
public IEnumeratorIteratorImpl (IEnumerator en) {
|
||||
_en = en;
|
||||
}
|
||||
|
||||
public bool hasNext () {
|
||||
return _en.MoveNext ();
|
||||
}
|
||||
|
||||
public Object next () {
|
||||
return _en.Current;
|
||||
}
|
||||
|
||||
public void remove () {
|
||||
throw new NotSupportedException (GetType ().Name + " UnsupportedOperationException");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.RequestParameterValuesMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using java.util;
|
||||
using System.Collections.Specialized;
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
sealed class RequestParameterValuesMap : BaseRequestParameterMap
|
||||
{
|
||||
public RequestParameterValuesMap (NameValueCollection form)
|
||||
: base (form) {
|
||||
}
|
||||
|
||||
protected override Object getAttribute (String key) {
|
||||
return Form.GetValues (key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using javax.servlet;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces.application;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletFacesContext : AspNetFacesContext
|
||||
{
|
||||
protected ServletFacesContext (FacesContext wrappedFacesContext, ExternalContext externalContext, HttpContext httpContext, FacesContext oldFacesContext)
|
||||
: base (wrappedFacesContext, externalContext, httpContext, oldFacesContext) {
|
||||
}
|
||||
|
||||
public static ServletFacesContext GetFacesContext (FacesContextFactory facesContextFactory,
|
||||
ServletContext servletContext,
|
||||
ServletRequest servletRequest,
|
||||
ServletResponse servletResponse,
|
||||
Lifecycle lifecycle,
|
||||
HttpContext httpContext,
|
||||
string executionFilePath) {
|
||||
FacesContext oldFacesContex = FacesContext.getCurrentInstance ();
|
||||
FacesContext wrappedFacesContex = facesContextFactory.getFacesContext (servletContext, servletRequest, servletResponse, lifecycle);
|
||||
ExternalContext externalContext = new ServletExternalContext (wrappedFacesContex.getExternalContext (), httpContext, executionFilePath);
|
||||
ServletFacesContext context = new ServletFacesContext (wrappedFacesContex, externalContext, httpContext, oldFacesContex);
|
||||
return context;
|
||||
}
|
||||
|
||||
}
|
||||
#region ServletExternalContext
|
||||
|
||||
public class ServletExternalContext : BaseExternalContext
|
||||
{
|
||||
readonly ExternalContext _externalContext;
|
||||
|
||||
public ServletExternalContext (ExternalContext externalContext, HttpContext httpContext, string executionFilePath)
|
||||
: base (httpContext, executionFilePath) {
|
||||
_externalContext = externalContext;
|
||||
}
|
||||
|
||||
public override void dispatch (string __p1) {
|
||||
_externalContext.dispatch (__p1);
|
||||
}
|
||||
|
||||
public override string encodeActionURL (string __p1) {
|
||||
return _externalContext.encodeActionURL (__p1);
|
||||
}
|
||||
|
||||
public override string encodeNamespace (string __p1) {
|
||||
return _externalContext.encodeNamespace (__p1);
|
||||
}
|
||||
|
||||
public override string encodeResourceURL (string __p1) {
|
||||
return _externalContext.encodeResourceURL (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getApplicationMap () {
|
||||
return _externalContext.getApplicationMap ();
|
||||
}
|
||||
|
||||
public override string getAuthType () {
|
||||
return _externalContext.getAuthType ();
|
||||
}
|
||||
|
||||
public override object getContext () {
|
||||
return _externalContext.getContext ();
|
||||
}
|
||||
|
||||
public override string getInitParameter (string __p1) {
|
||||
return _externalContext.getInitParameter (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getInitParameterMap () {
|
||||
return _externalContext.getInitParameterMap ();
|
||||
}
|
||||
|
||||
public override string getRemoteUser () {
|
||||
return _externalContext.getRemoteUser ();
|
||||
}
|
||||
|
||||
public override object getRequest () {
|
||||
return _externalContext.getRequest ();
|
||||
}
|
||||
|
||||
public override string getRequestContextPath () {
|
||||
return _externalContext.getRequestContextPath ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestCookieMap () {
|
||||
return _externalContext.getRequestCookieMap ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestHeaderMap () {
|
||||
return _externalContext.getRequestHeaderMap ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestHeaderValuesMap () {
|
||||
return _externalContext.getRequestHeaderValuesMap ();
|
||||
}
|
||||
|
||||
public override java.util.Locale getRequestLocale () {
|
||||
return _externalContext.getRequestLocale ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getRequestLocales () {
|
||||
return _externalContext.getRequestLocales ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestMap () {
|
||||
return _externalContext.getRequestMap ();
|
||||
}
|
||||
|
||||
public override string getRequestServletPath () {
|
||||
return _externalContext.getRequestServletPath ();
|
||||
}
|
||||
|
||||
public override java.net.URL getResource (string __p1) {
|
||||
return _externalContext.getResource (__p1);
|
||||
}
|
||||
|
||||
public override java.io.InputStream getResourceAsStream (string __p1) {
|
||||
return _externalContext.getResourceAsStream (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Set getResourcePaths (string __p1) {
|
||||
return _externalContext.getResourcePaths (__p1);
|
||||
}
|
||||
|
||||
public override object getResponse () {
|
||||
return _externalContext.getResponse ();
|
||||
}
|
||||
|
||||
public override object getSession (bool __p1) {
|
||||
return _externalContext.getSession (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getSessionMap () {
|
||||
return _externalContext.getSessionMap ();
|
||||
}
|
||||
|
||||
public override java.security.Principal getUserPrincipal () {
|
||||
return _externalContext.getUserPrincipal ();
|
||||
}
|
||||
|
||||
public override bool isUserInRole (string __p1) {
|
||||
return _externalContext.isUserInRole (__p1);
|
||||
}
|
||||
|
||||
public override void log (string __p1, Exception __p2) {
|
||||
_externalContext.log (__p1, __p2);
|
||||
}
|
||||
|
||||
public override void log (string __p1) {
|
||||
_externalContext.log (__p1);
|
||||
}
|
||||
|
||||
public override void redirect (string __p1) {
|
||||
_externalContext.redirect (__p1);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using javax.faces.component;
|
||||
using System.Web.UI;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces;
|
||||
using javax.servlet;
|
||||
using javax.faces.webapp;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using System.Diagnostics;
|
||||
using javax.faces.render;
|
||||
using System.IO;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesPageHandler
|
||||
{
|
||||
static protected void SetupResponseWriter (AspNetFacesContext facesContext, string contentType, string characterEncoding) {
|
||||
RenderKit renderKit = BaseHttpServlet.RenderKitFactory.getRenderKit (facesContext, facesContext.getViewRoot ().getRenderKitId ());
|
||||
ResponseWriter writer = renderKit.createResponseWriter (new AspNetResponseWriter (facesContext.Context.Response.Output), contentType, characterEncoding);
|
||||
facesContext.setResponseWriter (writer);
|
||||
}
|
||||
|
||||
#region AspNetResponseWriter
|
||||
private sealed class AspNetResponseWriter : java.io.Writer
|
||||
{
|
||||
readonly TextWriter _writer;
|
||||
public AspNetResponseWriter (TextWriter writer) {
|
||||
_writer = writer;
|
||||
}
|
||||
public override void close () {
|
||||
_writer.Close ();
|
||||
}
|
||||
|
||||
public override void flush () {
|
||||
_writer.Flush ();
|
||||
}
|
||||
|
||||
public override void write (char [] __p1, int __p2, int __p3) {
|
||||
_writer.Write (__p1, __p2, __p3);
|
||||
}
|
||||
|
||||
public override void write (int __p1) {
|
||||
_writer.Write ((char) __p1);
|
||||
}
|
||||
|
||||
public override void write (char [] __p1) {
|
||||
_writer.Write (__p1);
|
||||
}
|
||||
|
||||
public override void write (string __p1) {
|
||||
_writer.Write (__p1);
|
||||
}
|
||||
|
||||
public override void write (string __p1, int __p2, int __p3) {
|
||||
_writer.Write (__p1, __p2, __p3);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class ServletFacesPageHandler : BaseFacesPageHandler, IHttpHandler, IServiceProvider
|
||||
{
|
||||
readonly FacesContextFactory _facesContextFactory;
|
||||
readonly Lifecycle _lifecycle;
|
||||
readonly string _executionFilePath;
|
||||
readonly Type _pageType;
|
||||
Page _page;
|
||||
|
||||
public bool IsReusable {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public ServletFacesPageHandler (string executionFilePath, Type pageType, FacesContextFactory facesContextFactory, Lifecycle lifecycle) {
|
||||
_facesContextFactory = facesContextFactory;
|
||||
_lifecycle = lifecycle;
|
||||
_executionFilePath = executionFilePath;
|
||||
_pageType = pageType;
|
||||
}
|
||||
|
||||
protected virtual ServletFacesContext GetFacesContext (FacesContextFactory facesContextFactory,
|
||||
ServletContext servletContext,
|
||||
ServletRequest servletRequest,
|
||||
ServletResponse servletResponse,
|
||||
Lifecycle lifecycle,
|
||||
HttpContext httpContext,
|
||||
string executionFilePath) {
|
||||
return ServletFacesContext.GetFacesContext (facesContextFactory, servletContext, servletRequest, servletResponse, lifecycle, httpContext, executionFilePath);
|
||||
}
|
||||
|
||||
public void ProcessRequest (HttpContext context) {
|
||||
ServletWorkerRequest wr = (ServletWorkerRequest) ((IServiceProvider) context).GetService (typeof (HttpWorkerRequest));
|
||||
ServletContext servletContext = wr.GetContext ();
|
||||
HttpServletRequest request = wr.ServletRequest;
|
||||
HttpServletResponse response = wr.ServletResponse;
|
||||
|
||||
ServletFacesContext facesContext = GetFacesContext (_facesContextFactory, servletContext, request, response, _lifecycle, context, _executionFilePath);
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
Trace.WriteLine ("FacesPageHandler: before execute");
|
||||
_lifecycle.execute (facesContext);
|
||||
Trace.WriteLine ("FacesPageHandler: after execute");
|
||||
}
|
||||
finally {
|
||||
UIViewRoot viewRoot = facesContext.getViewRoot ();
|
||||
if (viewRoot != null && viewRoot.getChildCount () > 0)
|
||||
_page = (Page) viewRoot.getChildren ().get (0);
|
||||
}
|
||||
Trace.WriteLine ("FacesPageHandler: before render");
|
||||
SetupResponseWriter (facesContext, response.getContentType (), response.getCharacterEncoding ());
|
||||
_lifecycle.render (facesContext);
|
||||
Trace.WriteLine ("FacesPageHandler: after render");
|
||||
}
|
||||
catch (FacesException fex) {
|
||||
Exception inner = fex.InnerException;
|
||||
if (inner != null)
|
||||
TypeUtils.Throw (inner);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
facesContext.release ();
|
||||
}
|
||||
}
|
||||
|
||||
public object GetService (Type serviceType) {
|
||||
if (serviceType == typeof (Type))
|
||||
return _pageType;
|
||||
if (serviceType == typeof (Page))
|
||||
return _page;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.Web;
|
||||
using System.Web.Compilation;
|
||||
using System.Web.UI;
|
||||
using javax.faces.component;
|
||||
using javax.servlet;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.servlet.http;
|
||||
using System;
|
||||
using javax.faces.webapp;
|
||||
using javax.faces;
|
||||
using System.Web.J2EE;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public sealed class ServletFacesPageHandlerFactory : BaseFacesPageHandlerFactory
|
||||
{
|
||||
public override IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path) {
|
||||
Type pageType = PageMapper.GetObjectType (context, url);
|
||||
IHttpHandler handler = new ServletFacesPageHandler (url, pageType, BaseHttpServlet.FacesContextFactory, BaseHttpServlet.Lifecycle);
|
||||
return SessionWrapper.WrapHandler (handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web.UI;
|
||||
|
||||
using javax.faces;
|
||||
using javax.faces.application;
|
||||
using javax.faces.render;
|
||||
using javax.faces.component;
|
||||
using javax.faces.context;
|
||||
using System.Web.Hosting;
|
||||
using System.Web;
|
||||
using java.util;
|
||||
using System.Diagnostics;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public sealed class ServletFacesStateManager : BaseFacesStateManager
|
||||
{
|
||||
public override void writeState (FacesContext facesContext, StateManager.SerializedView serializedView) {
|
||||
Trace.WriteLine ("Entering writeState");
|
||||
|
||||
if (serializedView != null) {
|
||||
if (isSavingStateInClient (facesContext)) {
|
||||
SaveStateInClient (facesContext, serializedView);
|
||||
}
|
||||
else {
|
||||
HttpSession session = (HttpSession) facesContext.getExternalContext ().getSession (true);
|
||||
string key = ((IExtendedViewHandler) facesContext.getApplication ().getViewHandler ()).EncodeNamespace (facesContext, VIEWSTATE);
|
||||
session.setAttribute (key, serializedView);
|
||||
}
|
||||
}
|
||||
|
||||
Trace.WriteLine ("Exiting writeState");
|
||||
}
|
||||
|
||||
protected override void restoreComponentState (FacesContext facesContext,
|
||||
javax.faces.component.UIViewRoot uiViewRoot,
|
||||
String renderKitId) {
|
||||
|
||||
Trace.WriteLine ("Entering restoreComponentState");
|
||||
|
||||
Object serializedComponentStates;
|
||||
if (isSavingStateInClient (facesContext)) {
|
||||
serializedComponentStates = GetStateFromClient (facesContext, uiViewRoot.getViewId(), renderKitId);
|
||||
}
|
||||
else {
|
||||
HttpSession session = (HttpSession) facesContext.getExternalContext ().getSession (false);
|
||||
if (session == null)
|
||||
serializedComponentStates = null;
|
||||
else {
|
||||
string key = ((IExtendedViewHandler) facesContext.getApplication ().getViewHandler ()).EncodeNamespace (facesContext, VIEWSTATE);
|
||||
SerializedView serializedView = session.getAttribute (key) as SerializedView;
|
||||
if (serializedView == null)
|
||||
serializedComponentStates = null;
|
||||
else
|
||||
serializedComponentStates = serializedView.getState ();
|
||||
}
|
||||
}
|
||||
((UIComponent) uiViewRoot.getChildren ().get (0)).processRestoreState (facesContext, serializedComponentStates);
|
||||
|
||||
Trace.WriteLine ("Exiting restoreComponentState");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using javax.servlet.http;
|
||||
using java.util;
|
||||
using javax.faces.context;
|
||||
using javax.faces.component;
|
||||
using java.lang;
|
||||
using javax.faces.render;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletFacesViewHandler : BaseFacesViewHandler
|
||||
{
|
||||
public ServletFacesViewHandler (ViewHandler viewHandler)
|
||||
: base (viewHandler) {
|
||||
}
|
||||
|
||||
public override string getActionURL (FacesContext facesContext, string viewId) {
|
||||
if (viewId.Length > 0 && viewId [0] == '/') {
|
||||
return facesContext.getExternalContext ().getRequestContextPath () + viewId;
|
||||
}
|
||||
else {
|
||||
return viewId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.servlet;
|
||||
using System.Web;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletIncludeUtils
|
||||
{
|
||||
public static void includeServlet (String servletPath, Object writer, Object aspPage, Object [] servletParams) {
|
||||
// Need to define logic for resolving the servletPath. Share code with portlet createRenderUrl.
|
||||
HttpContext context = HttpContext.Current;
|
||||
HttpWorkerRequest wr = (HttpWorkerRequest) ((IServiceProvider) context).GetService (typeof (HttpWorkerRequest));
|
||||
RequestDispatcher dispatcher = ((ServletContext) ((IServiceProvider) wr).GetService (typeof (ServletContext))).getRequestDispatcher (SERVLET_INCLUDE_HELPER_PATH);
|
||||
ServletResponse response = (ServletResponse) ((IServiceProvider) wr).GetService (typeof (ServletResponse));
|
||||
ServletRequest request = (ServletRequest) ((IServiceProvider) wr).GetService (typeof (ServletRequest));
|
||||
|
||||
// Setup params for the include call.
|
||||
String oldServletPath = (String) setAttribute (request, SERVLET_PATH_ATTRIBUTE_NAME, servletPath);
|
||||
Object oldAspPage = setAttribute (request, ASPPAGE_ATTRIBUTE_NAME, aspPage);
|
||||
Object [] oldServletParams = (Object []) setAttribute (request, SERVLET_PARAMS_ATTRIBUTE_NAME, servletParams);
|
||||
Object oldWriter = setAttribute (request, TEXT_WRITER_ATTRIBUTE_NAME, writer);
|
||||
|
||||
// Do the include call.
|
||||
dispatcher.include (request, response);
|
||||
|
||||
// Restore previous attribute values after the call.
|
||||
request.setAttribute (SERVLET_PATH_ATTRIBUTE_NAME, oldServletPath);
|
||||
request.setAttribute (ASPPAGE_ATTRIBUTE_NAME, oldAspPage);
|
||||
request.setAttribute (SERVLET_PARAMS_ATTRIBUTE_NAME, oldServletParams);
|
||||
request.setAttribute (TEXT_WRITER_ATTRIBUTE_NAME, oldWriter);
|
||||
}
|
||||
|
||||
public static String getServletPath (ServletRequest request) {
|
||||
return (String) request.getAttribute (SERVLET_PATH_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object getAspPage (ServletRequest request) {
|
||||
return request.getAttribute (ASPPAGE_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object [] getServletParams (ServletRequest request) {
|
||||
return (Object []) request.getAttribute (SERVLET_PARAMS_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object getTextWriter (ServletRequest request) {
|
||||
return request.getAttribute (TEXT_WRITER_ATTRIBUTE_NAME);
|
||||
}
|
||||
|
||||
private static Object setAttribute (ServletRequest request, String attrname, Object newval) {
|
||||
Object oldval = request.getAttribute (attrname);
|
||||
request.setAttribute (attrname, newval);
|
||||
return oldval;
|
||||
}
|
||||
|
||||
public static readonly String SERVLET_INCLUDE_HELPER_PATH = "/servletincludehelper";
|
||||
public static readonly String ASPPAGE_ATTRIBUTE_NAME = "vmw.servlet.include.asppage";
|
||||
public static readonly String SERVLET_PATH_ATTRIBUTE_NAME = "vmw.servlet.include.servlet.path";
|
||||
public static readonly String SERVLET_PARAMS_ATTRIBUTE_NAME = "vmw.servlet.include.servlet.params";
|
||||
public static readonly String TEXT_WRITER_ATTRIBUTE_NAME = "vmw.servlet.include.text.writer";
|
||||
}
|
||||
}
|
||||
Loaded 100 of 460 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user